margin container flutter code example
Example 1: flutter margins
Container (
margin: EdgeInsets.all(10.0),
margin: EdgeInsets.symmetric(vertical: 10.0, horizontal: 5.0),
margin: EdgeInsets.fromLTRB(1.0, 2.0, 3.0, 4.0);
child: Child
(
...
),
)
Example 2: flutter container margin
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white,
body: Container(
margin: const EdgeInsets.only(left: 20.0, right: 20.0),
child: Container(),
),
);
}
Example 3: boarder Container flutter
new Container(
margin: const EdgeInsets.all(15.0),
padding: const EdgeInsets.all(3.0),
decoration: BoxDecoration(
border: Border.all(color: Colors.blueAccent)
),
child: Text("My Awesome Border"),
)