You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 16, 2023. It is now read-only.
Please describe what the rule should do:
Any text styling or colors used in widgets to come from a Theme so these values can be shared throughout an app.
What category of rule is this? (place an "X" next to just one item)
[ ] Warns about a potential error (problem)
[x] Suggests an alternate way of doing something (suggestion)
[ ] Other (please specify:)
Provide 2-3 code examples that this rule will warn about (it will be better if you can provide both good and bad examples):
Good:
Container(
color:Theme.of(context).colorScheme.secondary,
child:Text(
'Text with a background color',
style:Theme.of(context).textTheme.headline6,
),
)
Bad:
Container(
color:Colors.red,
child:Text(
'Text with a background color',
style:TextStyle(color:Color(0xFF32DD35), fontSize:14),
),
)
Are you willing to submit a pull request to implement this rule?
No
The text was updated successfully, but these errors were encountered:
Please describe what the rule should do:
Any text styling or colors used in widgets to come from a Theme so these values can be shared throughout an app.
What category of rule is this? (place an "X" next to just one item)
[ ] Warns about a potential error (problem)
[x] Suggests an alternate way of doing something (suggestion)
[ ] Other (please specify:)
Provide 2-3 code examples that this rule will warn about (it will be better if you can provide both good and bad examples):
Good:
Bad:
Are you willing to submit a pull request to implement this rule?
No
The text was updated successfully, but these errors were encountered: