I have the following function to show a dialog, I used media query to set it to 100%, but when it runs, I still see white margin around the dialog.
How can I archive full-screen dialog?
Future<void> showLoadingDialog(BuildContext context, GlobalKey key) async {
Widget myDialog = SimpleDialog(
key: key,
backgroundColor: Colors.black54,
children: <Widget>[
Container(
width: MediaQuery.of(context).size.width,
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
CircularProgressIndicator(),
SizedBox(height: 10,),
Text("Please Wait....",style: TextStyle(color: accentColor),)
]),
)
]);
return showDialog<void>(
context: context,
barrierDismissible: false,
builder: (BuildContext context) {
return myDialog;
});
}