Add backgroundColor to RadioThemeData#171326
Add backgroundColor to RadioThemeData#171326auto-submit[bot] merged 3 commits intoflutter:masterfrom
backgroundColor to RadioThemeData#171326Conversation
| 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 flutter#168787 Follow-up of flutter#171204 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
Part of flutter#168787 Follow-up of flutter#171204 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
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.