Skip to content
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

[Material] RaisedButton text does not default to ColorScheme.onPrimary #22745

Closed
willlarche opened this issue Oct 5, 2018 · 10 comments
Closed
Labels
a: fidelity Matching the OEM platforms better f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels.

Comments

@willlarche
Copy link
Member

willlarche commented Oct 5, 2018

Function getTextColor in ButtonThemeData on the case ButtonTextTheme.normal returns black or white. Material Guidelines expect onPrimary since the fill color is primary.

Details: Make backwards compatible with existing behavior.

simulator screen shot - iphone x - 2018-10-05 at 14 16 20

@willlarche willlarche changed the title [Material] Button text does not default to ColorScheme.onPrimary [Material] RaisedButton text does not default to ColorScheme.onPrimary Oct 5, 2018
@willlarche
Copy link
Member Author

@HansMuller

@zoechi zoechi added framework flutter/packages/flutter repository. See also f: labels. f: material design flutter/packages/flutter/material repository. a: fidelity Matching the OEM platforms better labels Oct 7, 2018
@zoechi zoechi added this to the Goals milestone Oct 7, 2018
@Levi-Lesches
Copy link
Contributor

How is this not expected? Doesn't onPrimary mean white or black depending on the Brightness of the primary color?

@willlarche
Copy link
Member Author

onPrimary should be customized to fit in with the other colors in your scheme. Here's how the designer of Shrine did it:
Screen Shot 2019-08-19 at 11 46 22 AM

@Levi-Lesches
Copy link
Contributor

Oh OK, seems like I need to take a closer look at Color Schemes again

@Levi-Lesches
Copy link
Contributor

Any progress on this? #38646 needs this to be fixed, since AlertDialogs no longer respect normal theming, and rely solely on ColorSchemes now.

@bitsydarel
Copy link

Any update on this ?

@HansMuller
Copy link
Contributor

CC @darrenaustin

@bitsydarel
Copy link

is there a way to track the changes made in the framework regarding the colorScheme ?

@HansMuller
Copy link
Contributor

@willlarche, @Levi-Lesches, @bitsydarel - it's been a long time since this issue was opened and I apologize for the lack of activity. If you're still interested in the topic, there's a wide-ranging proposal for updating the button widgets and their themes in #54776. The new proposal does bind the default button colors to the overall theme's ColorSchme, per the Material Design spec.

I'm going to close this issue in favor of #54776.

@github-actions
Copy link

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 flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a: fidelity Matching the OEM platforms better f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels.
Projects
None yet
Development

No branches or pull requests

5 participants