我正在从服务器获取数据时调用此对话框.此对话框周围有空格.我可以删除对话框周围的空白.这是我的代码.

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
           ),
         ),
       ),
     ),
   ],
  ),
);

在这里,我正在调用这个对话框.我已经try 使用AlertDialog()和SimpleDialog(),两者都有相同的问题.

showDialog(context: context, child: new AlertDialog(
  content: bodyProgress,

));

enter image description here

推荐答案

内部AlertDialog设置contentPadding0

contentPadding: EdgeInsets.zero,

Flutter相关问答推荐

ShaderMask上的文本渐变问题

SingleChildScrollView正在将Container的高度限制为子对象,尽管使用了Expanded Inside Row()

文本未设置在集装箱摆动的中心

在Flutter 中创建自定义Snackbar类

如何删除使用isscllable时出现的左边距?

为什么PUT方法没有发出任何响应?

导航回上一页会将我带回Ffltter应用程序中的登录页面

Flutter在CustomPainter的右上角和左上角添加了2条曲线

Flutter 中的 setState() 内部是如何工作的?

如何更改Flutter 中文本的混合模式?

网页浏览器不支持鼠标滚动的行项目

如何使Flutter 屏幕无法关闭?

如何将行推到列的底部

Elevated 和 Outlined 按钮之间的动画

Freezed+BLoc 如何从 BLoc Listener 查看当前状态和特定状态的变量

Flutter 分析发现 Gitlab CI/CD 管道中的问题,但它在本地没有

从子类调用超类的超方法

如何在 Flutter 执行通知时运行后台代码?

配置项目:firebase_core时出现问题

如何按键在 map 列表中搜索