Dialog has an isShowing() method that should return if the dialog is currently visible . So you can use that to see if a dialog is showing and hide it with dismissDialog(). You just have to keep a reference to the Dialogs you create in onCreateDialog().
Read moreHow can I tell if AlertDialog builder is showing?
Builder is used to create an AlertDialog. Once you have an instance of an AlertDialog, you can determine whether or not it is still showing by then calling isShowing() on it .
Read moreHow do I get alerts on dialog?
Below are the steps for Creating the Alert Dialog Android Application:
Read moreHow do you check alert dialog is visible or not flutter?
“AlertDialog detect close flutter” Code Answer’s
Read more