我正在用Dart开发一个应用程序,我发现布局非常简单.然而,我遇到了一个问题,我认为这与小部件之间的默认填充有关.
我在一列中有两个Ffltter ButtonRow,它们之间有相当大的间隙,我想要消除它们之间的间隙.我猜是填充物引起的,到目前为止已经try 了各种方法,但都没有成功.代码摘录如下:
@override
Widget build(BuildContext context) {
return new Scaffold(
...
body: new Column(
...
children: <Widget>[
...
new Container(
margin: new EdgeInsets.all(0.0),
child: new Padding(
padding: new EdgeInsets.all(0.0),
child: new ButtonBar(
...
children: <Widget>[
new MaterialButton(
...
),
new MaterialButton(
...
),
),
),
),
),
new Container(
margin: new EdgeInsets.all(0.0),
child: new Padding(
padding: new EdgeInsets.all(0.0),
child: new ButtonBar(
...
children: <Widget>[
new MaterialButton(
...
),
new MaterialButton(
...
),
],
),
),
),
],
),
);
}