flutter layoutbuilder pading code example
Example 1: how to add padding flutter
Padding(
padding: EdgeInsets.all(10.0),
padding: EdgeInsets.symmetric(vertical: 10.0, horizontal: 5.0),
padding: EdgeInsets.fromLTRB(1.0, 2.0, 3.0, 4.0);
child: Child
(
...
),
)
Example 2: flutter layout builder
var container = new Container(
width: 100.0,
child: new LayoutBuilder(
builder: (BuildContext context, BoxConstraints constraints) {
if(constraints.maxWidth > 200.0) {
return new Text('BIG');
} else {
return new Text('SMALL');
}
}
),
);