我正在try 向Card小部件中的一些文本和图标的顶部和底部添加一些填充.我发现Ffltter为容器提供了一种简单的方法,但似乎找不到使用其他小部件实现这一点的方法(除了将它们包装在容器中之外).这是我到目前为止得到的代码:
body: new Container(
padding: new EdgeInsets.all(10.0),
child: new Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget> [
new Card(
color: Colors.white70,
child: new Container(
padding: new EdgeInsets.all(10.0),
child: new Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget> [ //Padding between these please
new Text("I love Flutter", style: new TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold)),
new Icon(Icons.favorite, color: Colors.redAccent, size: 50.0)
]
)
)
)
]
)
)
因此,在"我的子项"列中,我想在顶部和底部添加一些填充,而不必插入新的容器.这个是可能的吗?