A very simple drawing i want to draw …
Three nested container…Big Medium and small…but i am not getting what i want..
if i wrap container inside center widget..works fine..but what without center widget.
return Scaffold(
body: Center(child: Container(
height: 200,
width: 200,
decoration: buildDecoration(Colors.red),
child: Container(
height: 100,
width: 100,
decoration: buildDecoration(Colors.green),
child: Container(
height: 50,
width: 50,
decoration: buildDecoration(Colors.blue),
),
),
),),
)
2
Answers
Use this code snipped, You need to add Row or Column
You can provide
alignment
on Container, it will provide you the output.And make sure to check more about layout/constraints.