我有一列有 3 行,如何删除行之间的空间?
这是我的代码:
Widget _buildTable() {
return Column(
children: [
Row(
children: _getBtns(),
),
Row(
children: _getBtns(),
),
Row(
children: _getBtns(),
),
]);
}
List<Widget> _getBtns() {
final result = <Widget>[];
for (int i = 0; i < 7; i++) {
result.add(
Expanded(
child: RaisedButton(color: Colors.green, onPressed: () {}),
),
);
}
return result;
}
Run Code Online (Sandbox Code Playgroud)
这是我想得到的:
放 materialTapTargetSize
child: RaisedButton(color: Colors.green, onPressed: () {}, materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,),
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2866 次 |
| 最近记录: |