-
Notifications
You must be signed in to change notification settings - Fork 28.6k
Switch
widget color doesn't use ColorScheme
#93709
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
Labels
f: material design
flutter/packages/flutter/material repository.
found in release: 2.5
Found to occur in 2.5
found in release: 2.6
Found to occur in 2.6
framework
flutter/packages/flutter repository. See also f: labels.
has reproducible steps
The issue has been confirmed reproducible and is ready to work on
r: fixed
Issue is closed as already fixed in a newer version
Comments
Thanks for the report. I see the same behavior. stable, master flutter doctor -v
/cc @HansMuller |
8 tasks
Switch
widget color doesn't use ColorScheme
Repository owner
moved this from PR submitted
to Done (PR merged)
in Nevercode
Aug 2, 2022
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 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
f: material design
flutter/packages/flutter/material repository.
found in release: 2.5
Found to occur in 2.5
found in release: 2.6
Found to occur in 2.6
framework
flutter/packages/flutter repository. See also f: labels.
has reproducible steps
The issue has been confirmed reproducible and is ready to work on
r: fixed
Issue is closed as already fixed in a newer version
Uh oh!
There was an error while loading. Please reload this page.
Looks like
Switch
widget still needs deprecatedaccentColor
to be defined inThemeData
in order to not use the default color on Android. In my project I defined a wholeColorScheme
to not use deprecated color values inThemeData
and saw thatSwitch
ignoressecondary
defined in the app theme. I can only change color by addingaccentColor
property.Attached a sample project with fully defined
ColorScheme
andSwitch
not following it.This is how

Switch
looks with justColorScheme
defined:This is how

Switch
should look like and how it looks when I addaccentColor
toThemeData
:Steps to Reproduce
ColorScheme
(with all defined colors)Switch
widget and observe that it has the default Material blue color on Android.Expected results:
Switch
followssecondary
color as it is suggested in deprecation message foraccentColor
Actual results:
Switch
has default Material blue color on AndroidCode sample
bug.zip
flutter doctor output
The text was updated successfully, but these errors were encountered: