Flutter,如何删除对话框周围的空白?

Amm*_*ang 3 dialog dart flutter flutter-layout

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

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
           ),
         ),
       ),
     ),
   ],
  ),
);
Run Code Online (Sandbox Code Playgroud)

在这里,我称此对话框。我尝试过AlertDialog()和SimpleDialog()都存在相同的问题。

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

));
Run Code Online (Sandbox Code Playgroud)

在此处输入图片说明

Dhi*_*rma 6

内部AlertDialog设置contentPadding 0

contentPadding: EdgeInsets.all(0.0),
Run Code Online (Sandbox Code Playgroud)

  • 谢谢 Diraj,这工作正常,但正如你所看到的,我使用的是圆形半径框,拐角处仍然有空白。 (2认同)