Menu does not stand out from the background #179
Comments
@jpnurmi There are a bunch of issues with elevation when you set For Since it does not behave like this, this currently causes widgets like popup menu, most dialogs and drawer to get no elevation. Since you cannot access the underlaying Material props, via these widgets' props or themes, the only fix is to wrap such widgets with a new theme where Material3 is not being used. This effectively renders opting in using Material3 in its current state, even for the widgets that are implemented quite a big mess, since getting elevation on dialogs, drawer and popup menu without this hassle is rather critical. Can't recommend using Material3 opt-in on any channel in Flutter yet. |
@Feichtmeier What do you think about switching back to M2 until M3 is in better shape? |
@rydmike Thanks for chiming in, by the way. This is very valuable information, much appreciated! |
Apart from the context menu I really enjoy the M3 parts in yaru.dart as for example the appbar and bottombar color having the same color as the rest of the window so it does not look so alien and the tint colors in the cards :) |
@jpnurmi and @Feichtmeier, if you don't have so many of them, or just make a custom popup menu wrapper if you do, you can fix the none elevated popup / context menu by wrapping it in a copy of your theme with useMaterial3 set to false, that is then only used by the menu. The poupup menu wont get any M3 tint colored based elevation then, but is not doing that yet anyway since it is not implemented yet. An example is shown here: flutter/flutter#105101 In this issue I discuss and explain this issue a bit more if it is of interest: rydmike/flex_color_scheme#54 I had been thinking of opening an issue where I would explain all the issues the current approach is causing during the transition for users that want use M3 already now, but seeing how it was shut down in other attempts I doubt it would have any success either. It is really Material that would have needed to implemented its M3 support a bit differently, then this issue could have been avoided during the transitional period too. FlexColorScheme can also create M3 like inspired themes without using M3, so there not using it is an option. However, I do agree with @Feichtmeier that if you are using it already, then M3 brings many other desirable designs by default, that are hard to drop once you have used them, so keeping it is probably what you prefer. If you do not have a drawer and many dialogs where the elevation is also an issue, then wrapping the context menu with a theme where M3 is false might be a nice temp workaround, that you can easily remove when it is fixed in the framework. |
The text was updated successfully, but these errors were encountered: