Skip to content
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
32a6914
[animations] Refactor `Radio` widgets in example
alexskobozev Oct 1, 2025
64064df
[camera] Refactor `Radio` widgets in example
alexskobozev Oct 1, 2025
157a932
[camera] Refactor `Radio` widgets in example
alexskobozev Oct 1, 2025
8109fb3
[camera_android_camerax] Refactor `Radio` widgets in example
alexskobozev Oct 1, 2025
bc09c33
[camera_avfoundation] Refactor `Radio` widgets in example
alexskobozev Oct 1, 2025
dfc6124
[google_sign_in_web] Refactor `Radio` widgets in example
alexskobozev Oct 1, 2025
57f7be9
[two_dimensional_scrollables] Refactor `Radio` widgets in example
alexskobozev Oct 1, 2025
7b2db36
Fix lints in animations example
alexskobozev Oct 1, 2025
fe84be7
[two_dimensional_scrollables] Fix lints in examples
alexskobozev Oct 1, 2025
b813cf9
[camera_avfoundation] Format example `main.dart`
alexskobozev Oct 1, 2025
5bcf490
Adds miscellaneous formatting fixes
alexskobozev Oct 1, 2025
c6cdb22
Merge remote-tracking branch 'upstream/main' into handle_deprecated_r…
alexskobozev Oct 2, 2025
f6b2de3
Update changelogs
alexskobozev Oct 2, 2025
09df509
Revert "Update changelogs"
alexskobozev Oct 3, 2025
7b2347e
Merge remote-tracking branch 'upstream/main' into handle_deprecated_r…
alexskobozev Oct 3, 2025
6c5c615
[google_sign_in_web] Disable RadioListTile when onChanged is null
alexskobozev Oct 3, 2025
3234a2b
[camera_avfoundation] Disable camera selection during recording
alexskobozev Oct 3, 2025
aaba578
Update changelogs
alexskobozev Oct 3, 2025
5e347e4
[google_sign_in_web] Simplify `onChanged` callback in example
alexskobozev Oct 6, 2025
3ded134
Merge branch 'main' into handle_deprecated_radio_examples
alexskobozev Oct 6, 2025
2a923fe
[google_sign_in_web] Update onChanged callback in example: pass it as…
alexskobozev Oct 7, 2025
71f6c80
Merge remote-tracking branch 'origin/handle_deprecated_radio_examples…
alexskobozev Oct 7, 2025
0839417
Merge branch 'main' into handle_deprecated_radio_examples
alexskobozev Oct 8, 2025
eceac1f
Merge branch 'main' into handle_deprecated_radio_examples
alexskobozev Oct 12, 2025
39e0367
Merge branch 'main' into handle_deprecated_radio_examples
alexskobozev Oct 16, 2025
ddc19d5
Update versions
alexskobozev Oct 16, 2025
764aef8
fix version match
alexskobozev Oct 17, 2025
abda454
Merge branch 'main' into handle_deprecated_radio_examples
alexskobozev Oct 17, 2025
587bbde
Merge branch 'main' into handle_deprecated_radio_examples
alexskobozev Oct 20, 2025
5e92e4b
Merge branch 'main' into handle_deprecated_radio_examples
alexskobozev Oct 20, 2025
a0f6243
Merge branch 'main' into handle_deprecated_radio_examples
alexskobozev Oct 21, 2025
ed108d7
update version
alexskobozev Oct 21, 2025
7c0ca21
Merge branch 'main' into handle_deprecated_radio_examples
alexskobozev Oct 22, 2025
8eba7ed
Update versions
alexskobozev Oct 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/animations/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## NEXT
Copy link
Contributor

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?

Copy link
Collaborator

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).


* 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.

## 2.0.11
Expand Down
50 changes: 22 additions & 28 deletions packages/animations/example/lib/shared_axis_transition.dart
Original file line number Diff line number Diff line change
Expand Up @@ -76,34 +76,28 @@ class _SharedAxisTransitionDemoState extends State<SharedAxisTransitionDemo> {
),
),
const Divider(thickness: 2.0),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Radio<SharedAxisTransitionType>(
value: SharedAxisTransitionType.horizontal,
groupValue: _transitionType,
onChanged: (SharedAxisTransitionType? newValue) {
_updateTransitionType(newValue);
},
),
const Text('X'),
Radio<SharedAxisTransitionType>(
value: SharedAxisTransitionType.vertical,
groupValue: _transitionType,
onChanged: (SharedAxisTransitionType? newValue) {
_updateTransitionType(newValue);
},
),
const Text('Y'),
Radio<SharedAxisTransitionType>(
value: SharedAxisTransitionType.scaled,
groupValue: _transitionType,
onChanged: (SharedAxisTransitionType? newValue) {
_updateTransitionType(newValue);
},
),
const Text('Z'),
],
RadioGroup<SharedAxisTransitionType>(
groupValue: _transitionType,
onChanged: (SharedAxisTransitionType? newValue) {
_updateTransitionType(newValue);
},
child: const Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Radio<SharedAxisTransitionType>(
value: SharedAxisTransitionType.horizontal,
),
Text('X'),
Radio<SharedAxisTransitionType>(
value: SharedAxisTransitionType.vertical,
),
Text('Y'),
Radio<SharedAxisTransitionType>(
value: SharedAxisTransitionType.scaled,
),
Text('Z'),
],
),
),
],
),
Expand Down
3 changes: 2 additions & 1 deletion packages/camera/camera/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## NEXT
## 0.11.2+1

* 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.
* Updates README to reflect that only Android API 24+ is supported.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexskobozev @stuartmorgan-g this note in the changelog and updated readme seems to be out of sync with the sdk: ^3.7.0 constraint in the camera/pubspec.yaml.

This camera 0.11.2+1 plugin release shows up as Upgradable in a Flutter project that has sdk: 3.8.1 constraint (i.e. requires to support Android 21).

If the camera plugin dropped support for Android 21 - it should not be upgradable and maybe plugin's sdk constraint need to be bumped to Dart 3.9?

Copy link
Collaborator

@stuartmorgan-g stuartmorgan-g Oct 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you are going to comment on PRs instead of filing issues when you believe there's an issue, please use the relevant PR (which is #9851 here, not this one).

Your concern is addressed in the description of that PR:

people on older versions of Flutter, and supporting older versions of Android in their apps, will still get compatible versions, they just aren't the versions we are supporting now

This camera 0.11.2+1 plugin release shows up as Upgradable in a Flutter project that has sdk: 3.8.1 constraint (i.e. requires to support Android 21).

Yes, that is correct. 0.11.2+1 will work correctly in a project that supports Android 21.

If the camera plugin dropped support for Android 21 - it should not be upgradable

"Support" here refers to the camera plugin holistically, not the camera package specifically, and is not the same thing as "runs on". If someone files an issue today about an issue that happens when using camera* only on Android 21-23, we would close that issue saying that we no longer support Android <24, and thus, Android <24 is not supported.

We deliberately do not go into a lot of details about the specific runtime support matrix of each sub-package, because that's way to much information for the README, and the resolver will ensure that the right thing happens regardless. If someone really wants that level of detail, they can read the individual pubspecs.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stuartmorgan-g I commented on this PR because it triggered the plugin release.

I realize that older platform plugins are pulled instead. Though for consistency with federated platform plugins the camera plugin might be better use the same sdk constraint because this note in the changelog is misleading about Android 21 support. The camera example project also has sdk 3.9 constraint.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stuartmorgan-g I commented on this PR because it triggered the plugin release.

And I'm asking you to please not do that. The only reason I—the person who this comment was relevant to—saw this question is because I happened to have reviewed this PR. Meanwhile it's spamming a random contributor who has nothing to do with the thing you are asking about.

In general, it is a much better idea to report issues or potential issues via the issue tracker. There is a system for routing them to the right people, instead of just hoping that the right person sees the comment.

Though for consistency with federated platform plugins the camera plugin might be better use the same sdk constraint

Anyone maintaining a federated plugin is welcome to manage their constraints however they choose to. For our plugins, we follow our documented policy of not adding artificial restrictions.


Expand Down
8 changes: 5 additions & 3 deletions packages/camera/camera/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -598,9 +598,7 @@ class _CameraExampleHomeState extends State<CameraExampleHome>
width: 90.0,
child: RadioListTile<CameraDescription>(
title: Icon(getCameraLensIcon(cameraDescription.lensDirection)),
groupValue: controller?.description,
value: cameraDescription,
onChanged: onChanged,
),
),
);
Expand All @@ -610,7 +608,11 @@ class _CameraExampleHomeState extends State<CameraExampleHome>
return Expanded(
child: SizedBox(
height: 56.0,
child: ListView(scrollDirection: Axis.horizontal, children: toggles),
child: RadioGroup<CameraDescription>(
groupValue: controller?.description,
onChanged: onChanged,
child: ListView(scrollDirection: Axis.horizontal, children: toggles),
),
),
);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/camera/camera/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: A Flutter plugin for controlling the camera. Supports previewing
Dart.
repository: https://github.com/flutter/packages/tree/main/packages/camera/camera
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+camera%22
version: 0.11.2
version: 0.11.2+1

environment:
sdk: ^3.7.0
Expand Down
4 changes: 4 additions & 0 deletions packages/camera/camera_android/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.10.10+9

* Updates examples to use the new RadioGroup API instead of deprecated Radio parameters.

## 0.10.10+8

* Restores compileSdk version to flutter.compileSdkVersion.
Expand Down
8 changes: 5 additions & 3 deletions packages/camera/camera_android/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -599,16 +599,18 @@ class _CameraExampleHomeState extends State<CameraExampleHome>
width: 90.0,
child: RadioListTile<CameraDescription>(
title: Icon(getCameraLensIcon(cameraDescription.lensDirection)),
groupValue: controller?.description,
value: cameraDescription,
onChanged: onChanged,
),
),
);
}
}

return Row(children: toggles);
return RadioGroup<CameraDescription>(
groupValue: controller?.description,
onChanged: onChanged,
child: Row(children: toggles),
);
}

String timestamp() => DateTime.now().millisecondsSinceEpoch.toString();
Expand Down
2 changes: 1 addition & 1 deletion packages/camera/camera_android/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Android implementation of the camera plugin.
repository: https://github.com/flutter/packages/tree/main/packages/camera/camera_android
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+camera%22

version: 0.10.10+8
version: 0.10.10+9

environment:
sdk: ^3.9.0
Expand Down
4 changes: 4 additions & 0 deletions packages/camera/camera_android_camerax/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.6.23+1

* Updates examples to use the new RadioGroup API instead of deprecated Radio parameters.

## 0.6.23

* Converts NV21-compatible streamed images to NV21 when requested. In doing so,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -609,16 +609,18 @@ class _CameraExampleHomeState extends State<CameraExampleHome>
width: 90.0,
child: RadioListTile<CameraDescription>(
title: Icon(getCameraLensIcon(cameraDescription.lensDirection)),
groupValue: controller?.description,
value: cameraDescription,
onChanged: onChanged,
),
),
);
}
}

return Row(children: toggles);
return RadioGroup<CameraDescription>(
groupValue: controller?.description,
onChanged: onChanged,
child: Row(children: toggles),
);
}

String timestamp() => DateTime.now().millisecondsSinceEpoch.toString();
Expand Down
2 changes: 1 addition & 1 deletion packages/camera/camera_android_camerax/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: camera_android_camerax
description: Android implementation of the camera plugin using the CameraX library.
repository: https://github.com/flutter/packages/tree/main/packages/camera/camera_android_camerax
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+camera%22
version: 0.6.23
version: 0.6.23+1

environment:
sdk: ^3.8.1
Expand Down
4 changes: 4 additions & 0 deletions packages/camera/camera_avfoundation/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.9.21+5

* Updates examples to use the new RadioGroup API instead of deprecated Radio parameters.

## 0.9.21+4

* Migrates `updateOrientation` and `setCaptureSessionPreset` methods to Swift.
Expand Down
27 changes: 14 additions & 13 deletions packages/camera/camera_avfoundation/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -579,14 +579,6 @@ class _CameraExampleHomeState extends State<CameraExampleHome>
Widget _cameraTogglesRowWidget() {
final List<Widget> toggles = <Widget>[];

void onChanged(CameraDescription? description) {
if (description == null) {
return;
}

onNewCameraSelected(description);
}

if (_cameras.isEmpty) {
SchedulerBinding.instance.addPostFrameCallback((_) async {
showInSnackBar('No camera found.');
Expand All @@ -599,18 +591,27 @@ class _CameraExampleHomeState extends State<CameraExampleHome>
width: 90.0,
child: RadioListTile<CameraDescription>(
title: Icon(getCameraLensIcon(cameraDescription.lensDirection)),
groupValue: controller?.description,
value: cameraDescription,
onChanged: (controller?.value.isRecordingVideo ?? false)
? null
: onChanged,
),
),
);
}
}

return Row(children: toggles);
final bool isRecording = controller?.value.isRecordingVideo ?? false;

return RadioGroup<CameraDescription>(
groupValue: controller?.description,
onChanged: (CameraDescription? description) {
if (isRecording) {
return;
}
if (description != null) {
onNewCameraSelected(description);
}
},
child: Row(children: toggles),
);
}

String timestamp() => DateTime.now().millisecondsSinceEpoch.toString();
Expand Down
2 changes: 1 addition & 1 deletion packages/camera/camera_avfoundation/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: camera_avfoundation
description: iOS implementation of the camera plugin.
repository: https://github.com/flutter/packages/tree/main/packages/camera/camera_avfoundation
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+camera%22
version: 0.9.21+4
version: 0.9.21+5

environment:
sdk: ^3.9.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,21 +169,30 @@ Widget _renderRadioListTileCard<T extends Enum>({
T? selected,
void Function(T?)? onChanged,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this ever null? If so, this is also a behavior change for the same reason. (If not, it should be replumbed through the file to be non-nullable.)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It can be null in button tester to support the state when there are no auth credentials.
Added enabled attribute instead of nullable onChanged since it has the same behaviour. Thanks for the catch
Before on/off (nullable onChanged)
before_on
before_off

After on/off (enabled attribute)
after_on
after_off

}) {
final void Function(T?) handleChange = onChanged ?? (_) {};

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) => handleChange(v),
child: Column(
mainAxisSize: MainAxisSize.min,
children:
values
.map(
(T value) => RadioListTile<T>(
value: value,
selected: value == selected,
title: Text(value.name),
dense: true,
),
)
.toList(),
),
),
],
);
}

Expand Down
1 change: 1 addition & 0 deletions packages/two_dimensional_scrollables/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## NEXT
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

Copy link
Collaborator

Choose a reason for hiding this comment

The 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,38 +56,27 @@ class _TableExplorerState extends State<TableExplorer> {
child: Row(
children: <Widget>[
const Spacer(),
Radio<TableType>(
value: TableType.simple,
RadioGroup<TableType>(
groupValue: _currentExample,
onChanged: (TableType? value) {
setState(() {
_currentExample = value!;
});
if (value == null) {
return;
}
setState(() => _currentExample = value);
},
child: Row(
children: <Widget>[
const Radio<TableType>(value: TableType.simple),
const Text('Simple'),
_spacer,
const Radio<TableType>(value: TableType.merged),
const Text('Merged'),
_spacer,
const Radio<TableType>(value: TableType.infinite),
const Text('Infinite'),
],
),
),
const Text('Simple'),
_spacer,
Radio<TableType>(
value: TableType.merged,
groupValue: _currentExample,
onChanged: (TableType? value) {
setState(() {
_currentExample = value!;
});
},
),
const Text('Merged'),
_spacer,
Radio<TableType>(
value: TableType.infinite,
groupValue: _currentExample,
onChanged: (TableType? value) {
setState(() {
_currentExample = value!;
});
},
),
const Text('Infinite'),
const Spacer(),
],
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,27 +50,24 @@ class _TreeExplorerState extends State<TreeExplorer> {
child: Row(
children: <Widget>[
const Spacer(),
Radio<TreeType>(
value: TreeType.simple,
RadioGroup<TreeType>(
groupValue: _currentExample,
onChanged: (TreeType? value) {
setState(() {
_currentExample = value!;
});
if (value == null) {
return;
}
setState(() => _currentExample = value);
},
child: Row(
children: <Widget>[
const Radio<TreeType>(value: TreeType.simple),
const Text('Simple'),
_spacer,
const Radio<TreeType>(value: TreeType.custom),
const Text('Custom'),
],
),
),
const Text('Simple'),
_spacer,
Radio<TreeType>(
value: TreeType.custom,
groupValue: _currentExample,
onChanged: (TreeType? value) {
setState(() {
_currentExample = value!;
});
},
),
const Text('Custom'),
const Spacer(),
],
),
Expand Down