I want to design a Grid like the below output in flutter.
Please help with this.

The Code I have tried is this:
Container(
height: 100,
width: 170,
margin: const EdgeInsets.symmetric(horizontal: 30),
child: DecoratedBox(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(20),
color: Colors.white,
),
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(20),
color: Colors.black
),
margin: const EdgeInsets.all(1.5),
child: const Center(
child: Text(
"data",
style: TextStyle(color: Colors.white),
),
),
),
),
),
Thanks in advance for your help.
CodePudding user response:
What you can do to maintain a grid is use Wrap.
Not very efficient for long list of items but for short it will suffice.
Take a look at the code below :
( You can run this code using 

