https://docs.flutter.io/flutter/material/showDialog.html says
The dialog route created by this method is pushed to the root navigator. If the application has multiple Navigator objects, it may be necessary to call
Navigator.of(context, rootNavigator: true).pop(result)
to close the dialog rather justNavigator.pop(context, result)
.
so I’d assume one of these two should do what you want.