Home > OS >  Choosing a suitable Flutter gallery package
Choosing a suitable Flutter gallery package

Time:07-21

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

CodePudding user response:

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 enter image description here

  • Related