Search code examples
flutterdartwidgetimage-galleryflutter-packages

Choosing a suitable Flutter gallery package


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


Solution

  • 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