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

Strict Enforcement of Material Theme #2

Open
pattobrien opened this issue Jan 31, 2023 · 0 comments
Open

Strict Enforcement of Material Theme #2

pattobrien opened this issue Jan 31, 2023 · 0 comments
Labels
new_rule Request for a new lint or assist rule

Comments

@pattobrien
Copy link
Owner

pattobrien commented Jan 31, 2023

Design system elements are more powerful when used together with proper Theming in a Flutter app. If developers simply use static properties like Color throughout a codebase, then those UI elements will not dynamically update on theme changes: for example, if a user switches from dark to light mode.

Enforcing strict usage of Themes throughout a codebase is necessary for these cases. Additionally, we'll need to consider use cases such as defining Theme extensions for custom Widgets (e.g MyPrimaryButton).

Text themes specifically are more prone to inline editing (e.g. adding boldness to a particular Text widget). We will need to understand if there's a non-inline way of modifying themes.

Another potential problem is that Material Theme has many fallback themes, in case one is not explicitly specified at the Widget or App levels. If we have an off-white in our design system, but we don't use that off-white anywhere in our App theme, do we throw a lint if a Text widget uses a white from the default Material Theme and not the off-white from our design system? We need to understand the inner workings of Theme and Material's fallback themes to come up with a sustainable solution.

@pattobrien pattobrien added the new_rule Request for a new lint or assist rule label Jan 31, 2023
@pattobrien pattobrien changed the title Strict Enforcement of Theme Allow Material Theme Usage Apr 4, 2023
@pattobrien pattobrien changed the title Allow Material Theme Usage Strict Enforcement of Material Theme Apr 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new_rule Request for a new lint or assist rule
Projects
None yet
Development

No branches or pull requests

1 participant