-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
It would be nice to be able to extend ThemeData with app-specific palettes. This would allow switching app-specific colors by using the Theme widget, and would coordinate the colors with the existing theme switching mechanisms including animations.
Currently, it's possible to create one's own theme classes using a parallel class hierarchy to the built-in one, but you don't get automatic integration with the animation that AnimatedTheme provides when switching between themes. That means when the user changes the app's theme, the colors of some elements of the app's UI will tween smoothly, while other app-specific colors will not.
For example, the app may use a palette to control the color of app-specific widgets, e.g. weather icons. These custom color sets may not match up well with any of the existing colors provided in the Theme class, so the provided colors cannot be used, but the actual color choices may still vary depending on the app's overall theme (e.g. light or dark). Without this feature, the developer has to do extra work to set up his own theme classes and keep them in sync with those provided to the Theme widget, but it's visually jarring to switch themes when these custom colors aren't integrated with the provided theme animations.