我想知道如何在颤动中对齐按钮。我是不熟悉的新手,对于当前代码,我无法抛出任何行,列或换行。我想以垂直方式对齐我的按钮,但当前将其水平对齐并给我显示“ RIGHT OVER BY 256 PIXELS”显示错误
return showDialog<void>(
context: context,
builder: (BuildContext context) {
return AlertDialog(
content: Text("You have $counts routes!"),
actions: <Widget>[
new FlatButton(
textColor: Colors.black,
padding:
EdgeInsets.fromLTRB(20, 0, 0, 10),
child: Text(
"This is route 1! \n" +
rList[0] + "\n"),
onPressed: () {},
),
new FlatButton(
textColor: Colors.black,
padding:
EdgeInsets.fromLTRB(20, 0, 0, 10),
child: Text(
"This is your second route! \n" +
rList[1] + "\n"),
onPressed: () {},
),
],
);
});
只需将按钮添加到Column
actions: <Widget>[
Column(
crossAxisAlignment: CrossAxisAlignment.end,
children: <Widget>[
button,
button
]
)
],