-
Notifications
You must be signed in to change notification settings - Fork 26.7k
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
Add a Theme.merge that implements the logic of the main ThemeData constructor #9148
Comments
Specifically, I think we need a version of ThemeData.copyWith that implements the logic of the main ThemeData constructor. There's no way right now to take a ThemeData, and say "ok now assume you had this swatch instead, what would you have to change". |
We should probably use the same technique that I used in #9358. |
Over 2 years later is this ever being implemented? |
@dllz flutter has 7000+ issues, and this one is marked as Would be nice to see it on the roadmap though |
ThemeData.copyWith now recalculates all default values when the brightness changes. Theme.merge uses this to provide a new Theme to their descendants. Unfortunately it's not a ThemeData that's passed to Theme.merge, but the parameters themselves. If it's desired I can change it to make it pass a ThemeData, but I didn't at first to keep things simpler. Implements flutter#9148. Relevant to flutter#9871.
There is still an apparent bug that one cannot override the brightness for a specific scaffold as the Theme does not override. Eg.,
Is there a fix to this? |
There should be a merge method for all styling classes ( By the way, why are there so many terms to refer to styling? Is there a technical reason? |
"changing the accent color on an input on one screen is complicated" was feedback offered about our theming system.
Ian says on solution here would be to add a copyWith constructor onto theme?
Did I capture that correctly @Hixie?
The text was updated successfully, but these errors were encountered: