Flutter,如何删除对话框周围的空格? [英] Flutter, How to remove white spaces around dialog box?
本文介绍了Flutter,如何删除对话框周围的空格?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在从服务器获取数据时调用此对话框.此对话框周围有空格.我可以删除对话框周围的这个空白区域.这是我的代码.
I am calling this dialog while getting data from server. This dialog box is having white spaces around it. I can I remove this white space around my dialog box. Here is my code.
var bodyProgress = new Container(
decoration: new BoxDecoration(
color: Colors.blue[200],
borderRadius: new BorderRadius.circular(10.0)
),
width: 300.0,
height: 200.0,
//color: Colors.blue,
alignment: AlignmentDirectional.center,
child: new Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
new Center(
child: new SizedBox(
height: 50.0,
width: 50.0,
child: new CircularProgressIndicator(
value: null,
strokeWidth: 7.0,
),
),
),
new Container(
margin: const EdgeInsets.only(top: 25.0),
child: new Center(
child: new Text(
"Signing up...",
style: new TextStyle(
color: Colors.white
),
),
),
),
],
),
);
我在这里调用这个对话框.我已经尝试过 AlertDialog() 和 SimpleDialog() 两者都有相同的问题.
Here I am calling this dialog. I've tried with both AlertDialog() and SimpleDialog() having same issue with both.
showDialog(context: context, child: new AlertDialog(
content: bodyProgress,
));
推荐答案
Inside AlertDialog set contentPadding 0
Inside AlertDialog set contentPadding 0
contentPadding: EdgeInsets.zero,
这篇关于Flutter,如何删除对话框周围的空格?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文