, , .
(/) / , . (, )
- , - . Row .
Expanded, , .
A Expandeds / .
, , Expanded :
var row = new Container(
width: 400.0,
height: 100.0,
child: new Row(
children: [
new Container(
width: 50.0,
decoration: new BoxDecoration(
backgroundColor: Colors.red[500],
)
),
new Expanded(
flex: 1,
child: new Container(
decoration: new BoxDecoration(
backgroundColor: Colors.green[500],
)
),
),
new Expanded(
flex: 2,
child: new Container(
decoration: new BoxDecoration(
backgroundColor: Colors.blue[500],
)
),
)
]
),
);
:

:
50dp , . 50dp, .
350dp (400-350), .
flex Expanded, : 1 [] + 2 [] = 3
Expanded flex Expanded flex Expandeds: Green = 1/3, Blue = 2/3.
, 1/3 * 350 = 116.67dp
2/3 * 350 = 233.33dp
: , , - . Expandeds flex, 1. (1/1 = 100%), .
:
var container = new Container (
child: new Row (
children: [
new Icon (Icons.navigate_before),
new Expanded(
child: new Text ("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat."),
),
new Icon (Icons.navigate_next),
],
),
decoration: new BoxDecoration (
backgroundColor: Colors.grey[300],
),
width: 400.0,
);