How to run code after showDialog is dismissed in Flutter?

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);
});

Leave a Comment