So i have a 9x9 grid that i want to seperate into 3x3 grids, in the backend it should remain a 9x9 grid but in the UI it should look as if it is seperated into 3x3 grids. It should look like this, ignore the colors. The margin between the 3x3 grids is what i am looking for
We can use Container border,
body: GridView.count(
crossAxisCount: 3,
children: [
...List.generate(
9,
(index) => Container(
decoration: BoxDecoration(
border: Border.all(
width: 3,
color: Colors.blue,
),
),
alignment: Alignment.center,
child: GridView.count(
physics: NeverScrollableScrollPhysics(),
crossAxisCount: 3,
children: [
...List.generate(
9,
(index) => Container(
decoration: BoxDecoration(
border: Border.all(
width: 1,
color: Colors.grey,
),
),
alignment: Alignment.center,
child: GridView.count(
crossAxisCount: 3,
),
),
)
],
),
),
)
],
),
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.