如何改变我的扁平按钮在颤动的位置...(从大多数左侧到最右侧)

问题描述 投票:0回答:2

我已经构建了一个简单的应用程序来学习扑动。我想将一个平面按钮移动到屏幕的最右侧。

我似乎无法使用填充属性,我不知道为什么。

new FlatButton(
  onPressed: () => debugPrint("pressed"),
  child: new Text("DONATE",
    style: new TextStyle(
      fontSize: 16,
      color: Colors.green[400]
    )
  )
)
flutter padding flutter-layout
2个回答
0
投票

你有没有检查过扑克布局,here

plus padding属性用于按钮内部移动按钮操纵margin属性。希望有所帮助。


0
投票

试试这个:

Row(
  mainAxisAlignment: MainAxisAlignment.end,
  children: <Widget>[
    FlatButton(
      onPressed: () => debugPrint("pressed"),
      child: new Text("DONATE",
        style: new TextStyle(
          fontSize: 16,
          color: Colors.green[400]
        )
      )
    ),
  ],
),

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.