-
Notifications
You must be signed in to change notification settings - Fork 28.6k
Regression: AppBarTheme
properties iconTheme
and actionsIconTheme
ignored on master channel when useMaterial3
is true
#107305
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
Comments
@TahaTesser I did not dig so deep into what causes it. Somehow I got the feeling it might have something to do with ButtonStyle button being used for the IconButton, but not sure. I did not see anything obvious in AppBar itself that would be causing it, but i might have missed it. Current tests in master do not catch this issue. |
@rydmike M3 IconButton uses the ButtonStyle button and its
Generally theme color returns null when no theme is implemented, the widget uses the default color as a result. However I will figure out how to get this property without breaking the default M3 IconButton. |
Also spending some time with this, It looks like there is more to do than just fixing |
@TahaTesser and @QuncCccccc yes it is more than I originally thought that maybe just putting in some cases to handle it in Another gotcha with that is that there are more widgets than Definitely trickier than it first appeared to be, which is probably also why the current tests don't catch this issue. |
Thanks a lot for the information. Will looking at this issue asap! |
Just verified in master 3.1.0-0.0.pre.2108, that the fix has landed and works. Thanks! |
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
If you create an
AppBarTheme
where you define properties for itsiconTheme
andactionsIconTheme
, for exampleand create a
ThemeData
where it is assigned toappBarTheme
anduseMaterial3
is true, and use it as yourMaterialApp.theme
. The assignedAppBarTheme
colors are not respected on latest Channel master, 3.1.0-0.0.pre.1560, but on Flutter stable 3.0.4 it works OK.Is this a regression? Looks so to me.
Expected results (on stable 3.0.4)
On current Flutter Stable channel this works OK.
This can be tested and verified with the sample code in this DartPad as well:
https://dartpad.dev/?id=946d29aa48e8ec3446281acaab61e4c5
Actual results (on master channel)
The icon sizes in the
AppBarTheme
are respected, but the colors are overridden by the AppBar's M3 default icon colors. Presumably it should be possible to control the icon colors via theAppBarTheme
as before also when using Material3.Code sample
Flutter Doctor
The text was updated successfully, but these errors were encountered: