Skip to content

Custom/scoped popping and PopScope#50

Open
cybex-dev wants to merge 6 commits intoemrade:masterfrom
cybex-dev:feat_custom_popping
Open

Custom/scoped popping and PopScope#50
cybex-dev wants to merge 6 commits intoemrade:masterfrom
cybex-dev:feat_custom_popping

Conversation

@cybex-dev
Copy link
Copy Markdown

Introduced PopScope wrapping the AlertDialog preventing undesired navigation while the dialog is open. For example, a dialog popup show "Your account needs attention" preventing further interaction with the app until an issue is resolved.

Further, popping of the dialog in the above case is only possible provided the dialog context via a button action. Thus, the confirm & cancel buttons both provide the BuildContext of the dialog itself allow the buttons to pop the dialog and not it's parent widget/route.

This is to pop the dialog within it's context. Popping in the `CoolAlert.show(context)` pops using the parent context (or root  context in the example app) with falls back to a black/blank screen.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant