如何在 flutter 中更改我的 flatbutton 的位置...(从最左到最右)
how to change the location of my flatbutton in flutter... (from most left to most right)
我构建了一个简单的应用程序来学习 flutter。我想把一个平面按钮移到屏幕的最右边。
我似乎无法使用填充 属性 而且我不知道为什么。
new FlatButton(
onPressed: () => debugPrint("pressed"),
child: new Text("DONATE",
style: new TextStyle(
fontSize: 16,
color: Colors.green[400]
)
)
)
你检查过 flutter 布局了吗,here
plus padding属性是为了在按钮内部移动按钮操作margin属性。
希望对您有所帮助。
试试这个:
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
FlatButton(
onPressed: () => debugPrint("pressed"),
child: new Text("DONATE",
style: new TextStyle(
fontSize: 16,
color: Colors.green[400]
)
)
),
],
),
我构建了一个简单的应用程序来学习 flutter。我想把一个平面按钮移到屏幕的最右边。
我似乎无法使用填充 属性 而且我不知道为什么。
new FlatButton(
onPressed: () => debugPrint("pressed"),
child: new Text("DONATE",
style: new TextStyle(
fontSize: 16,
color: Colors.green[400]
)
)
)
你检查过 flutter 布局了吗,here
plus padding属性是为了在按钮内部移动按钮操作margin属性。 希望对您有所帮助。
试试这个:
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
FlatButton(
onPressed: () => debugPrint("pressed"),
child: new Text("DONATE",
style: new TextStyle(
fontSize: 16,
color: Colors.green[400]
)
)
),
],
),