【发布时间】:2021-01-02 21:33:32
【问题描述】:
我一直在尝试在 Flutter 的 AlertDialog 框中创建一个按钮。但我找不到拉伸按钮容器的方法。请检查我的代码并查看下面的示例图片。
AlertDialog(
title: Center(child: Text("Picture")),
content: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Container(
width: width,
//height: height,
child: FadeInImage.memoryNetwork(
placeholder: kTransparentImage,
image: image.url,
),
),
SizedBox(
height: 10,
),
InkWell(
onTap: () {
Navigator.pop(context);
},
child: Container(
alignment: Alignment.center,
height: 50,
width: width,
color: primaryColor,
child: Text(
'Okay',
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold),
),
),
),
],
),
);
请帮助我。我期待听到您的意见。提前谢谢你。
【问题讨论】:
标签: flutter dart flutter-alertdialog