First and foremost, thanks for writing such a good book and sharing with us. It really helps for getting out the tutorial valley.
My question is, how can I add modal dialogs to one of the example projects (let’s say navigation chapter)? For example, I’d like to have a CircularProgressIndicator inside an AlertDialog, which have its barrierDismissible property set as false. This way I can show the user that the app is on something (trying to login) and prevent accidental taps on the underlying page.
This modal dialog has to stay over the login page as the timer counts down, and it should be gone right after _loggedIn is set in AppStateManager.
I’ve applied many methods and was able to show the modal dialog properly but always faced two problems:
- Navigator.pop(context) either popped wrong page or not popped the dialog at all.
- Couldn’t write a proper ‘handlePop’ code to prevent user tap on device’s back button (Android) while the modal dialog was active.
Thanks in advance.
Regards,