Skip to content
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

[Issue-55] Fix barrierDismissible parameter has no effect to prevent modal dismissing #56

Merged
merged 1 commit into from
Sep 6, 2023

Conversation

ulusoyca
Copy link
Collaborator

@ulusoyca ulusoyca commented Sep 5, 2023

Description

This PR addresses the bug where even when barrierDismissible was set to false, the modal could still be dismissed when tapping on the barrier.

Changes

Added a condition to check for barrierDismissible. If it's true, only then it will decide whether to use onModalDismissedWithBarrierTap or fall back to Navigator.of(context).pop.

Added Tests

Ensure that when barrierDismissible is true, the modal can be dismissed by tapping outside.
Ensure that when barrierDismissible is false, the modal cannot be dismissed by tapping outside.

By making this change, we ensure that the modal dismissal respects the barrierDismissible property, and it provides a consistent user experience.

@ulusoyca ulusoyca requested a review from TahaTesser September 5, 2023 13:19
@ulusoyca ulusoyca changed the title [Issue-55] Fix barrier dismiss parameter has no effect [Issue-55] Fix barrierDismissible parameter has no effect to prevent modal dismissing Sep 5, 2023
Copy link
Collaborator

@TahaTesser TahaTesser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ulusoyca ulusoyca merged commit 213d8bc into main Sep 6, 2023
@ulusoyca ulusoyca deleted the issue-55-barrier-dismiss-has-no-effect branch September 6, 2023 11:06
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.

2 participants