Simply use await or then. the code in then block will be run after the dialog is dismissed.
showDialog(
// Your Dialog Code
).then((val){
Navigator.pop(_context);
});
Simply use await or then. the code in then block will be run after the dialog is dismissed.
showDialog(
// Your Dialog Code
).then((val){
Navigator.pop(_context);
});