-
Notifications
You must be signed in to change notification settings - Fork 29.1k
Drawer barrier non dismissible with the escape key #173263
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
base: master
Are you sure you want to change the base?
Drawer barrier non dismissible with the escape key #173263
Conversation
…roperty named drawerDismissible
Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
…missible"; moved tests topackages/flutter/test/material/drawer_test.dart
…ally_assessments; left the ones there as they were before
…omanejaquez/flutter into drawer_barrier_non_dismissible
Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
…omanejaquez/flutter into drawer_barrier_non_dismissible
Co-authored-by: Justin McCandless <justinjmccandless@gmail.com>
…losed using the escape key if the drawerBarrierDismissible flag is set
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces a drawerBarrierDismissible
property to Scaffold
and DrawerController
to control whether the drawer can be dismissed by tapping the scrim or pressing the escape key. The implementation is straightforward, passing the new property down from Scaffold
to DrawerController
and using it to conditionally enable dismissal gestures. The changes are well-covered by new tests. I have one suggestion to improve the efficiency and readability of the code that handles the escape key dismissal.
c8e6333
to
b06e443
Compare
The analyzer is complaining. There were also a lot of unnecessary formatting changes. Can you try |
7ff2f1b
to
ec35f07
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍 . Thanks for following up and fixing this.
I'm a little confused about the fact that it looks like changes from #164810 are in this PR? Was it just reverted or am I misreading it?
Also, you may need a merge or rebase in order to fix the ci.yaml validation check. |
d2992f9
to
3700459
Compare
Looks like the changes from #164810 are no longer showing up, thank you! But you've got an analyzer failure. |
Additional fix for the 'drawerBarrierDismissible' feature in which the ESC key can close the drawer even if the flag is set to false.
Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.
Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the
gemini-code-assist
bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.