我需要在我的应用程序中构建一个弹出对话框。我正在使用 Dialog 类,并将其包装在 SizedBox 类中以增加对话框的宽度。但是,对话框的宽度没有增加。如何增加它的宽度?
onTap: () {
showDialog(
context: context,
child:SizedBox(
width: 900,
child: Dialog(
backgroundColor :Colors.white,
insetAnimationDuration: const Duration(milliseconds: 10),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)),
child: Container(
child: Column(
children: <Widget>[
Text('hello'),
FlatButton(
onPressed: () {
Navigator.of(context).pop();
},
child: new Text("OK"),
),
]
),
),
),
),
);
},