【发布时间】:2021-06-17 05:06:45
【问题描述】:
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Icon(Icons.money_rounded,size: 30,),
Text('เงินสด',
style: TextStyle(
color: Colors.grey[700],
fontWeight: FontWeight.bold,
),
),
Text('1000 THB',
style: TextStyle(
color: Colors.grey[700],
fontWeight: FontWeight.bold,
),
),
RaisedButton(
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
onPressed: (){
},
child: Icon(Icons.add_outlined),
),
],
)
根据代码,他们像这样平均分配该行中的所有小部件(bc MainAxisAlignment.spaceAround)
----------------------------------------------
|...图标...|...文字...|...文字...|..按钮..|
----------------------------------------------
但我想将第一个图标和第一个文本分组到左侧,另外两个分组到这一行的右侧。
像这样
---------------------------------------------
|图标 |文字|........|文字|按钮 |
---------------------------------------------
对不起,我不会画,所以我希望你知道我想说什么。
【问题讨论】:
标签: flutter dart widget flutter-layout