Choosing a suitable Flutter gallery package

Viewed 36

Of the packages available in flutter,is there a package that can be used to achieve the below widget of images? enter image description here

1 Answers

Use StaggeredGridView

StaggeredGridView.countBuilder(
  padding: const EdgeInsets.all(12.0),
  crossAxisCount: 4,
  mainAxisSpacing: 24,
  crossAxisSpacing: 12,
  itemCount: images.length,
  itemBuilder: (BuildContext context, int index) =>
       ImageTile(image: images[index]),
  staggeredTileBuilder: (int index) => StaggeredTile.fit(2),
),

For reference

enter image description here

Related