I have been experimenting with flutter and GridView. Currently I have a number of containers appearing in a grid layout, however I want to add one more container below them and custom size it. I want all the existing containers to consume 60% of the screen, whereas the new container to completely cover the remaining 40%. I have experimented with Expanded Class with no luck. Any feedback / recommendations would be greatly appreciated.
Widget build(BuildContext context){
final title = ' MyFirstApp';
return MaterialApp(
title: title,
home: Scaffold(
appBar: AppBar(
backgroundColor: Colors.green,
title: Text(title),
),
body: GridView.count(
crossAxisCount: 3,
crossAxisSpacing: 10.0,
mainAxisSpacing: 10.0,
childAspectRatio: 0.80,
children: <Widget> [
new InkWell(
onTap: (){
navigateToSubPage(context, Page1());
print("Container clicked");
},
child: Container(
child: Column(
children: [
Image.asset('assets/main/page1.jpg'),
Text("Page1", style: TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold,
fontSize: 18),),
]),
)
),
new InkWell(
onTap: (){
navigateToSubPage(context, page2());
print("Container clicked 1");
},
child: Container(
child: Column(
children: [
Image.asset('assets/main/page2.jpg'),
Text("Page2", style: TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold,
fontSize: 18),),
]),
),
),
new InkWell(
onTap: (){
navigateToSubPage(context, page3());
print("Container clicked 2");
},
child: Container(
child: Column(
children: [
Image.asset('assets/main/page3.jpg'),
Text("Record", style: TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold,
fontSize: 18),),
]),
),
),
new InkWell(
onTap: (){
navigateToSubPage(context, page4());
print("Container clicked 3");
},
child: Container(
child: Column(
children: [
Image.asset('assets/main/page4.jpg'),
Text("Page4", style: TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold,
fontSize: 18),)
]),
),
),
new InkWell(
onTap: (){
print("Container clicked 4");
},
child: Container(
child: Column(
children: [
Image.asset('assets/main/page5.jpg'),
Text("Page5", style: TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold,
fontSize: 18),),
]),
),
),
new InkWell(
onTap: (){
print("Container clicked 5");
},
),
],
),
),
);
}```