我需要帮助才能使我的警报对话框全屏显示,这是我到目前为止的代码,我该如何实现?我不知道是否可以将宽度定义为屏幕尺寸和高度。
createNewMessage() {
return showDialog(
barrierDismissible: false,
context: context,
builder: (BuildContext context) {
return StatefulBuilder(builder: (context, setState) {
return WillPopScope(
onWillPop: () {},
child: Container(
child: new AlertDialog(
title: Column(
children: <Widget>[
new Text(Translations.of(context).trans('finishmessage') +
'?'),
Container(
height: 20,
),
DropdownButton(
hint: new Text('Para'),
isExpanded: true,
onChanged: (value) {
setState(() => selected = value);
},
value: selected,
items: workers.map((worker) {
return DropdownMenuItem(
child: new Text(worker.vNome),
value: worker.vCodigo,
);
}).toList(),
),
Container(
height: 10,
),
TextField(decoration: InputDecoration(labelText: "Data")),
Container(
height: 10,
),
TextField(decoration: InputDecoration(labelText: "Hora")),
Container(
height: 10,
),
TextField(
decoration: InputDecoration(labelText: 'Mensagem'))
],
),
actions: <Widget>[
FlatButton(
child:
Text(Translations.of(context).trans('sendMessage')),
onPressed: () {}),
FlatButton(
child:
Text(Translations.of(context).trans('closealert')),
onPressed: () {
setState(() => selected = null);
Navigator.of(context).pop();
}),
],
)));
});
});
}
这是目前的结果:
Alert dialog current
感谢您的帮助和时间