flutterflutter-layoutphoto-gallery

Is there a way to achieve a gridview with different size child widgets like this?


I am developing a app screen from flutter and having problem with designing this design and looping the data from database. Is there anyone who created a design like this in flutter please suggest me a way.

enter image description here


Solution

  •     StaggeredGridView.countBuilder(
          crossAxisCount: 3,
          itemCount: 16,
          itemBuilder: (BuildContext context, int index) => Container(
              color: Colors.green,
              child: Text('$index'),//your photo in place of this child
    ),
          staggeredTileBuilder: (int index) =>StaggeredTile.count(index%7==0?2:1,index%7==0?2:1,),
          mainAxisSpacing: 8.0,
          crossAxisSpacing: 8.0,
        )