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
[various] Migrate example Radio groups to new RadioGroup API (#10155)
This PR updates multiple package **example** apps to stop using deprecated `groupValue` and `onChanged` on individual `Radio` widgets and instead use the new `RadioGroup<T>` ancestor to manage the selected value and change handling.
### Why
Flutter deprecated `Radio.groupValue` and `Radio.onChanged` in favor of `RadioGroup`, which centralizes selection state for related radios. The deprecation is currently reported across several examples in this repo (see linked issue for examples and affected packages). This PR resolves those warnings.
### What changed (pattern applied across examples)
- Wrap related `Radio<T>` widgets in a `RadioGroup<T>(groupValue: ..., onChanged: ...)`.
- Remove `groupValue`/`onChanged` from each `Radio`, leaving only `value` (+ its label UI).
- Example (from `animations` demo): old three `Radio` widgets each had `groupValue`/`onChanged`; now they are enclosed in a single `RadioGroup<SharedAxisTransitionType>` and the `Radio` children keep just their `value`.
### Packages (examples) updated
- `animations`
- `camera`
- `camera_android`
- `camera_android_camerax`
- `camera_avfoundation`
- `google_sign_in_web`
- `two_dimensional_scrollables` (both `table_view` and `tree_view`)
### Screenshots
N/A (UI unchanged; only wiring of radios changed).
### Links
Fixes: [flutter/flutter#170915](flutter/flutter#170915)
---
## Pre-Review Checklist
0 commit comments