我试着做一个我在这里画的设计:

我现在的代码是:
@override
Widget build(BuildContext context) {
// Build a Form widget using the _formKey we created above
return Form(
key: _formKey,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
new Text(
'LBS: ',
),
TextFormField(
validator: (value) {
if (value.isEmpty) {
return 'Please enter LBS';
}
},
),
new Text(
'KG: ',
),
new Text(
'{kg value} ',
),
new Row(
new RaisedButton(
onPressed: null,
child: Text('Convert'),
),
new RaisedButton(
onPressed: null,
child: Text('Swap'),
)
),
],
),
);
}我的问题是我想要有两个按钮的新行。“新行”(“不需要争论”)。
发布于 2018-10-24 09:18:05
把你的纽扣包成一个孩子:..。
Row(
children: <Widget>[
new RaisedButton(
onPressed: null,
child: Text('Convert'),
),
new RaisedButton(
onPressed: null,
child: Text('Swap'),
],
)https://stackoverflow.com/questions/52965029
复制相似问题