Ad

How To Design Difference Size Grids In GridView In Flutter?

- 1 answer

enter image description here

I need to design like this Grid View using Flutter

Ad

Answer

try this, flutter_staggered_grid_view:

StaggeredGridView.countBuilder(
  crossAxisCount: 4,
  itemCount: 8,
  itemBuilder: (BuildContext context, int index) => new Container(
      color: Colors.green,
      child: new Center(
        child: new CircleAvatar(
          backgroundColor: Colors.white,
          child: new Text('$index'),
        ),
      )),
  staggeredTileBuilder: (int index) =>
      new StaggeredTile.count(2, index.isEven ? 2 : 1),
  mainAxisSpacing: 4.0,
  crossAxisSpacing: 4.0,
)
Ad
source: stackoverflow.com
Ad