The scenario is that I need to dismiss the dialog of the sign-in page after user is signed in. But after the user is signed in, the authentication branch is no longer available - meaning dialog's parent is nuked (the page that contains several auth options, it is replaced with home page due to user status listeners higher up the widget tree), so attempt to close the dialog programmatically like this fails
Navigator.of(context, rootNavigator: true).pop();
//or Navigator.of(context).pop();
The error that I receive reads
Looking up a deactivated widget's ancestor is unsafe [...]
How do I close that kind of floating dialog?