-
Notifications
You must be signed in to change notification settings - Fork 29.8k
[Icons] Updating default icon theme values. #20840
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
[Icons] Updating default icon theme values. #20840
Conversation
HansMuller
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- This PR should also update the default disabled color for buttons (including IconButton). Currently it's initialized like this:
disabledColor ??= isDark ? Colors.white30 : Colors.black26;
I don't believe that's correct.
- Before committing this change we need to make sure that the resulting contrast is sufficient for a11y.
- This PR will need a tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm afraid that is probably overachieving. I don't think we want to start applying 0.87 to the opacity of all icons that specify a color, even though doing so is probably what's intended by the latest spec (https://material.io/design/iconography/system-icons.html#color).
There's a fine backwards compatibility line here. The appearance of an app that has specified an icon color explicitly shouldn't change; an app that's picking up the default icon color can change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
|
It looks like MaterialButton needs a similar change: Should just be LIkewise for: And maybe for: |
|
What about
|
|
The button changes look good. This issue's description should include before and after screenshots, to make it easier for developers to see what's changing. |
HansMuller
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't tester.widget<Text>(find.text(testText)).style work here? The test probably doesn't need to depend on the fact that the Text widget is defined in terms of RichText.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. You have to look for the RichText widget. The style on Text widgets is null when there's no theme. But it does draw. Just with private API to the RichText.
2433b74 to
0e39147
Compare
Closes #3188