Skip to content

Custom/scoped popping and PopScope #50

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

cybex-dev
Copy link

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