我正在图像上创建按钮,我想要图像底部中心的按钮
Widget buildBody() {
return Stack(
children: <Widget> [
Image(
image: new AssetImage('assets/homebg.png'),
),
Center(
child: RaisedButton(
onPressed: () => launch("tel://21213123123"),
child: new Text("Call me")
)
),
]
);
}
Run Code Online (Sandbox Code Playgroud)
我希望按钮的输出应该在图像的底部
And*_*sky 11
尝试添加 alignment
Stack(
alignment: Alignment.bottomCenter,
children: <Widget>[
Image(
image: new AssetImage('assets/homebg.png'),
),
Padding(
padding: EdgeInsets.all(8.0),
child: RaisedButton(
onPressed: () => launch("tel://21213123123"),
child: new Text("Call me")
)
),
]
);
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
6416 次 |
| 最近记录: |