我正在尝试使用按钮在行中添加多行内容,但是存在一些填充问题...如何分隔文本的填充
return Container(
alignment: Alignment.topLeft,
height: 30.0,
child: Row(
crossAxisAlignment: CrossAxisAlignment.stretch,
//mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Container(child: Text("${address1+', '+address2+', '+city+', '+state+', '+country}")),
IconButton(
padding: EdgeInsets.all(1.0),
icon: Icon(Icons.edit,size: 20.0,),
onPressed: () => print("a")
)
],
),
);
答案 0 :(得分:0)
您可以使用Padding Widget
在任何小部件中添加填充return Container(
alignment: Alignment.topLeft,
height: 30.0,
child: Row(
crossAxisAlignment: CrossAxisAlignment.stretch,
//mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Container(
child: Padding(
padding: const EdgeInsets.all(5.0),
child: Text("${address1+', '+address2+', '+city+', '+state+', '+country}")),
)
),
IconButton(
padding: EdgeInsets.all(1.0),
icon: Icon(Icons.edit,size: 20.0,),
onPressed: () => print("a")
)
],
),
);