-
Until 7.0.0-dev.3 the material drawer always left a gap on the right side. Since 7.0.0-dev.4 it is full width and I am having the same behavior in 7.0.1. Was that change intentional? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi @fotiDim, thanks for your question. I think you meant that since 7.0.0.dev-3, so 7.0.0.dev-3, 7.0.0 and 7.0.1, that the M3 drawer is 360dp wide by default. Yes, in M3 mode this is intentional. The default width of the Drawer follows the M3 specification, that states that is should be 360dp wide: https://m3.material.io/components/navigation-drawer/specs#ce8bfbcf-3dec-45d2-9d8b-5e10af1cf87d On old smaller phone that is my opinion a very poor design choice, since they are typically only 360dp wide. Which is why I made a study about it and wrote this flutter/flutter#123380. I have been in contact with @rodydavis to get some comments on the topic from the Material design team. I just added a reference in the FlexColorScheme docs to this known issue as well, I noticed it was missing: https://docs.flexcolorscheme.com/known_issues#flutter-navigationdrawer-wrong-default-width-in-m3 To use another width in FlexColorScheme than the current default 360dp, just set it to e.g. 320dp, nice compromise between old Flutter 304dp default and a bit wider, or set it to 304dp which was past default in Flutter for a drawer in M2 mode. As you can see in my analysis of the width 304dp is also not correct M2 spec, well OK it is, if your phone width is 360dp then 304dp is correct spec width, but only for that width case. subThemesData: const FlexSubThemesData(
drawerWidth: 320.0, // Or use 304.0 for M2 default.
), The new Themes Playground btw includes links to most known Flutter M3 theming issues that impacts it, see below. Screen.Recording.2023-04-07.at.12.41.24.movI am going to close this issue as it works as expected. I will move it the Discussions FAQ section though, as it is a good question. The default might change if the M3 spec is updated or to whatever Flutter will do. Hope this helps. |
Beta Was this translation helpful? Give feedback.
Hi @fotiDim, thanks for your question.
I think you meant that since 7.0.0.dev-3, so 7.0.0.dev-3, 7.0.0 and 7.0.1, that the M3 drawer is 360dp wide by default.
Yes, in M3 mode this is intentional. The default width of the Drawer follows the M3 specification, that states that is should be 360dp wide:
https://m3.material.io/components/navigation-drawer/specs#ce8bfbcf-3dec-45d2-9d8b-5e10af1cf87d
On old smaller phone that is my opinion a very poor design choice, since they are typically only 360dp wide. Which is why I made a study about it and wrote this flutter/flutter#123380. I have been in contact with @rodydavis to get some comments on the topic from the Material design team.
I just added …