GridView Builder Size issue in Flutter Example I
GridView.builder(
shrinkWrap: true,
itemCount: 7,
itemBuilder: (context, index) => InkWell(
onTap: (){
//Incase want to click
},
child:Padding(
padding: const EdgeInsets.all(2.0),
child: Text("VIEW $index"),
),
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 3,
childAspectRatio: 3,
),
),
GridView Builder Size issue in Flutter Example II
Another Way to manage Size
SizedBox(
height:100,
child:GridView.builder(
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 2,
childAspectRatio: MediaQuery.of(context).size.width /
(MediaQuery.of(context).size.height / 4),
),
itemCount: items.length,
itemBuilder: (context, index) {
return GridTile(child: Text(items[index]));
},
),
)