-
Notifications
You must be signed in to change notification settings - Fork 3.5k
[various] Migrate example Radio groups to new RadioGroup API #10155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 18 commits
32a6914
64064df
157a932
8109fb3
bc09c33
dfc6124
57f7be9
7b2db36
fe84be7
b813cf9
5bcf490
c6cdb22
f6b2de3
09df509
7b2347e
6c5c615
3234a2b
aaba578
5e347e4
3ded134
2a923fe
71f6c80
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -171,19 +171,27 @@ Widget _renderRadioListTileCard<T extends Enum>({ | |
}) { | ||
return _renderConfigCard( | ||
title: title, | ||
children: | ||
values | ||
.map( | ||
(T value) => RadioListTile<T>( | ||
value: value, | ||
groupValue: selected, | ||
onChanged: onChanged, | ||
selected: value == selected, | ||
title: Text(value.name), | ||
dense: true, | ||
), | ||
) | ||
.toList(), | ||
children: <Widget>[ | ||
RadioGroup<T>( | ||
groupValue: selected, | ||
onChanged: (T? v) => (onChanged ?? (_) {})(v), | ||
|
||
child: Column( | ||
mainAxisSize: MainAxisSize.min, | ||
children: | ||
values | ||
.map( | ||
(T value) => RadioListTile<T>( | ||
value: value, | ||
selected: value == selected, | ||
title: Text(value.name), | ||
enabled: onChanged != null, | ||
dense: true, | ||
), | ||
) | ||
.toList(), | ||
), | ||
), | ||
], | ||
); | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
## NEXT | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same applies here; the changes aren't to lib/main.dart. |
||
|
||
* Updates examples to use the new RadioGroup API instead of deprecated Radio parameters. | ||
* Updates minimum supported SDK version to Flutter 3.29/Dart 3.7. | ||
|
||
## 0.3.7 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why would we not want to release the updated sample code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pub.dev only shows
lib/main.dart
, and the changes in this package aren't to that file, so publishing wouldn't do anything (unless people are running examples out of their pub cache, but that's not something we expect/support in the repo policy).