flutter row 里面的元素分别居左和居右对齐
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(), ],);

浙公网安备 33010602011771号