1.new
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
new
Text(
"left"
),
new
Text(
"right"
)
]
);
2.Row(
children: <Widget>[
FlutterLogo(),
//左對齊
Expanded(child: SizedBox()),
//自動擴展擠壓
FlutterLogo(),
//右對齊
],
);
3.
Row(
children: <Widget>[
FlutterLogo(),
Spacer(),
FlutterLogo(),
],
);
4.
Row(
children: <Widget>[
FlutterLogo(),
Flexible(fit: FlexFit.tight, child: SizedBox()),
FlutterLogo(),
],
);