Home > Blockchain >  How to set rectangular shape to children of a grid?
How to set rectangular shape to children of a grid?

Time:06-11

I need to make the following page in flutter:

enter image description here

I need to make the following page in flutter. I already tried to do it with a SliverGrid.count(), the problem is that it is the grid that is in charge of establishing the width and height of its children. In addition, the width and height established are always the same(square shaped). Somehow I need to be able to modify the width and height and make it rectangular) so that the children are very similar to how they can be seen in the image

I appreciate any help you can give me

CodePudding user response:

GridView.count(
  crossAxisCount: 2,
  childAspectRatio: 0.8, // change this value for different results
  crossAxisSpacing: 5,
  mainAxisSpacing: 5,
padding: EdgeInsets.all(10.0),
  children: []
)
  • Related