我需要创建以下内容:
我可以用代码来做:
Row(
children: <Widget>[
Container(
width: 30
),
Column(
children: <Widget>[
Text("label"),
Container(
width: screenSize.width - 30, // <- this is problem
child: Row(
children: <Widget>[
Expanded( child: TextField() ),
Expanded( child: TextField() ),
],
),
),
],
),
],
);
是否有可能以其他方式执行,即width: screenSize.width - 30
行?
您可以在Column小部件内使用crossAxisAlignment并将其拉伸以获取屏幕上所有剩余的宽度