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
Update Drawer
to support Material 3
#103551
Comments
@darrenaustin even the current The M3 spec says the border radius on it should be "0,16,16,0dp corner radii", basically the visible corners should be rounded 16dp. The current Imo the visible edge corner shape should also be themeable ,so we can change the border radius, of course default would be M3 spec, when opting in on M3. Currently there is no way to correctly do this with its current theming capabilities, or perhaps I'm missing something. |
@rydmike @darrenaustin I think we will need to redesign the existing Share your thoughts. |
@ArishSultan if you want to be radical, deprecate drawer and add |
Drawer
to support Material 3
Just to quickly speak to the point @bernaferrari mentioned, just went through that process of getting that to work and it was much more painful than I would have anticipated for such a fundamental but of functionality, it feels like there is a lot of room here to improve the DX and the idea they mentioned is ultimately what I wish I could have done in the first place. |
I don't think that is an issue caused by the actual What I have tried:
To solve this issue I suggest the following:
Thanks! |
@rydmike I don't agree with you, the drawer widget is a very simple widget so to me it doesn't make a sense having a new one. Yes it's more easy but not the best solution to me. |
@elbeicktalat I actually agree with you, it was @bernaferrari that suggested making a new one. Still a new additional drawer/menu widget with more out of the box features would also be useful, but for different reasons. In that case I think the existing simple Drawer container should still exist and be available as starting point for own custom menus, like today. My comment was only concerning making the current Drawer have more theming properties. Could be something like visible corner radius, and screen edge corner radius (in addition to current general border radius, well Shape actually). Then when those widget props or theme props are used, let the widget figure out which corners should be rounded based on current directionality or if it is used in Scaffold drawer or endDrawer property. The last one might be tricky, since the widget itself or theme for it has no knowledge of that. TLDR: About theming widgets |
I don't know if we could integrate the |
This requires #108162 |
I created a doc to discuss about drawer/navigationDrawer in M3 , please feel free to comment! |
@hangyujin Thanks for implementing this. But I think one important thing is missing here: Is it possible to make the children of As the implementation looks like, this is not supported? |
I also wonder how safe areas should be correctly handled in regard to scroling? Maybe the widget should provide a good default behavior for this? |
Now reported here: #116782 |
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 |
As part of the Material 3 specification there are updates to the Navigation drawer visuals:
Currently Flutter only has the
Drawer
widget, but it is pretty bare-bones. We should look into possibly creating a new NavigationDrawer. It would be good if that could be integrated with theNavigationDestination
used by theNavigationBar
as well.The text was updated successfully, but these errors were encountered: