flutter/examples/api/lib/widgets
chunhtai d0058ec361
Adds radio group widget r2 (#168161)
<!--
Thanks for filing a pull request!
Reviewers are typically assigned within a week of filing a request.
To learn more about code review, see our documentation on Tree Hygiene:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
-->

previous https://github.com/flutter/flutter/pull/167363

I have to factor out abstract class for RadioGroupRegistry and
RadioClient which are subclassed by RadioGroupState and RawRadio
respectively.

I have to do this because the RadioListTile that has 2 focusnode one for
listTile and one for the radio it builds. The issue is that RadioGroup's
keyboard shortcut has to tightly couples with the focus node of each
radio, but the radioListtile has to mute the radio's focusnode so it can
act as one control under keyboard shortcut

d582b35809/packages/flutter/lib/src/material/radio_list_tile.dart (L484)

Therefore i abstract the out the logic of RadioGroup so that another
widget can participate by implementing the interface.

fixes https://github.com/flutter/flutter/issues/113562

migration guide: https://github.com/flutter/website/pull/12080/files

## Pre-launch Checklist

- [ ] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [ ] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [ ] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [ ] I signed the [CLA].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [ ] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] 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
2025-06-02 19:03:51 +00:00
..
actions Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
animated_grid Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
animated_list Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
animated_size Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
animated_switcher Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
app Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
app_lifecycle_listener Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
async Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
autocomplete Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
autofill Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
basic Wire up the system text scaler from PlatformDispatcher (#159999) 2025-05-13 23:52:05 +00:00
binding Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
color_filter Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
dismissible Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
drag_target Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
draggable_scrollable_sheet Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
editable_text Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
focus_manager Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
focus_scope Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
focus_traversal Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
form Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
framework Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
gesture_detector Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
hardware_keyboard Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
heroes Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
image Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
implicit_animations Remove redundant useMaterial3: true (#163376) 2025-03-14 17:50:20 +00:00
inherited_model Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
inherited_notifier Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
inherited_theme Rename Sample classes (#124080) 2023-04-04 20:34:29 +00:00
interactive_viewer Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
keep_alive Add documentation examples to KeepAlive AutomaticKeepAlive and AutomaticKeepAliveClientMixin (#168137) 2025-05-02 07:03:35 +00:00
layout_builder Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
magnifier Use wildcards (#161548) 2025-01-14 05:13:41 +00:00
media_query Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
navigator Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
navigator_pop_handler Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
nested_scroll_view Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
notification_listener Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
overflow_bar Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
overlay Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
overscroll_indicator Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
page Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
page_storage Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
page_view Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
pop_scope Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
preferred_size Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
radio_group Adds radio group widget r2 (#168161) 2025-06-02 19:03:51 +00:00
raw_menu_anchor Revert "Wire up MenuAnchor, MenuBar, MenuItem-related widgets to aria roles (#165596)" (#168339) 2025-05-05 23:57:33 +00:00
restoration Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
restoration_properties Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
routes Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
safe_area Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
scroll_end_notification Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
scroll_notification_observer Remove redundant useMaterial3: true (#163376) 2025-03-14 17:50:20 +00:00
scroll_position Remove redundant useMaterial3: true (#163376) 2025-03-14 17:50:20 +00:00
scroll_view Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
scrollbar Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
shared_app_data Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
shortcuts Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
single_child_scroll_view Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
sliver Reland "SliverEnsureSemantics (#165589)" (#166889) 2025-04-11 00:51:26 +00:00
sliver_fill Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
slotted_render_object_widget Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
system_context_menu Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
table Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
tap_region Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
text Remove redundant useMaterial3: true (#163376) 2025-03-14 17:50:20 +00:00
text_editing_intents Add action for configuring default action of EditableText.onTapUpOutside (#162575) 2025-02-28 19:01:33 +00:00
text_magnifier Remove redundant useMaterial3: true (#163376) 2025-03-14 17:50:20 +00:00
transitions Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
tween_animation_builder Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
undo_history Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
value_listenable_builder Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
widget_state Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00