-
Notifications
You must be signed in to change notification settings - Fork 27.9k
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
[adaptive_scaffold] drawer stays open after selection with no way to close it #141938
Comments
Thanks for filing this @rivasdiaz. stable, master flutter doctor -v
|
Hi @dam-ease , thanks for your quick response. Can I ask to please reconsider this issue as a bug instead of intended behavior? According to the material specification (both v2 and v3), modal navigation drawers can be dismissed by selecting an item (https://m3.material.io/components/navigation-drawer/guidelines#:~:text=Selecting%20a%20drawer%20item). This is not possible when using this component. If not, thanks for leaving it as a proposal. |
I agree - We can have a bug fix to dismiss drawer in case of already open for that specific Scaffold. Apparently, I will try to add some fix into this one & lets see how that goes. |
…on tap. (#6289) (#141938) *Changes included in PR are listed as follows* - As per material guidelines, Drawer shall be dismissed when user taps any destination/item. If drawer is open, and user taps on any item, before calling onDestinationSelected() - we are now dismissing drawer. - CHANGELOG.md file updated. - Updated to v0.1.9. *Issue : flutter/flutter#141938
…en on destination tap. (flutter/packages#6289)
flutter/packages@23e56af...b7fbe68 2024-03-21 [email protected] [adaptive_scaffold] : � #141938 - Drawer stays open even on destination tap. (flutter/packages#6289) 2024-03-20 [email protected] [camera_android] Update README to encourage users to use CameraX implementation (flutter/packages#6353) 2024-03-20 [email protected] Roll Flutter from d31a85b to b96c13d (19 revisions) (flutter/packages#6359) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Fix added, we can close the issue. |
@rivasdiaz - Can we please mark this issue as fixed/closed as fix has been deployed & available to users. |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
Steps to reproduce
Expected results
Drawer should close after clicking on a destination.
Actual results
Drawer does not close after clicking on a destination.
Although that seems the right approach for
AdaptiveScaffold
, it could also provide acloseDrawer
method likeScaffold
. Sadly, even thoughAdaptiveScaffold
uses aScaffold
internally, usingScaffold.of(context).closeDrawer()
does not work when used ononSelectedIndexChange
as the Scaffold context is a child of AdaptiveScaffold and so not found on the current context inside the handler.Code sample
Code sample
The example can be copied to DartPad to reproduce the bug.
Screenshots or Video
No response
Logs
No response
Flutter Doctor output
Doctor output
The text was updated successfully, but these errors were encountered: