simple_grid 0.0.3
simple_grid: ^0.0.3 copied to clipboard
A new Flutter package project.
simple_grid #
Inspired by bootstrap , This is dynamic grid layout that you can use Like a bootstrap grid.
Explanation #
There are 3 classes that you have to now, these are:
SpGridis the container of grid, more information hereSpGridItemis the children ofSpGrid, more information hereSpGridSizeis the class that you can declare the maximum of the screen size, more information here
Example #
SpGrid(width: MediaQuery.of(context).size.width, children: [
SpGridItem(
xs: 12,
sm: 6,
md: 4,
lg: 3,
child: Container(
color: Colors.blue,
height: 200,
),
),
SpGridItem(
xs: 12,
sm: 6,
md: 4,
lg: 3,
child: Container(
color: Colors.green,
height: 200,
),
),
SpGridItem(
xs: 12,
sm: 6,
md: 4,
lg: 3,
child: Container(
color: Colors.yellow,
height: 200,
),
),
SpGridItem(
xs: 12,
sm: 6,
md: 4,
lg: 3,
child: Container(
color: Colors.purple,
height: 200,
),
),
]);