Uh oh!
There was an error while loading. Please reload this page.
Add backgroundColor to RadioThemeData - #171326
Conversation
| widget.backgroundColor?.resolve(activeStates) ?? | ||
| radioTheme.backgroundColor?.resolve(activeStates) ?? | ||
| Colors.transparent; | ||
| final Color inactiveBackgroundColor = | ||
| widget.backgroundColor?.resolve(inactiveStates) ?? Colors.transparent; | ||
| widget.backgroundColor?.resolve(inactiveStates) ?? | ||
| radioTheme.backgroundColor?.resolve(inactiveStates) ?? | ||
| Colors.transparent; |
There was a problem hiding this comment.
I want to bring back the question from #169415 (comment)
I'm not sure how we want to handle those transparent colors? The other properties are using _RadioDefaultsM3 or _RadioDefaultsM2 as a fallbacks.
What is the best thing to do here?
Is this something that could/should be in the Material token database? Or is this ok as-is?
There was a problem hiding this comment.
Sorry I missed the conversation over there! Yes, we should add the transparent backgroundColor in the 2 default RadioThemeData. I don't think there's any tokens that specify the background color, so no token will need to be involved.
To add the default value in _RadioDefaultsM2:
we can just go to the class and add it manually.
For _RadioDefaultsM3:
We should go to dev/tools/gen_defaults/lib/radio_template.dart, add the default value for backgroundColor, then run script dev/tools/gen_defaults/bin/gen_defaults.dart in the root. The script will generate default M3 theme Data for us.
There was a problem hiding this comment.
Awesome thank you! I added it in Add background Color to defaults
QuncCccccc
left a comment
There was a problem hiding this comment.
LGTM! Thank you for your contribution:)!
Part of #168787
Follow-up of #171204
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.