From 1292114f26177997aaa4289bbbf62f5255916fb4 Mon Sep 17 00:00:00 2001 From: ValentinVignal Date: Sat, 5 Sep 2026 20:09:09 +0800 Subject: [PATCH 1/3] Deprecate cupertino segmented control --- packages/cupertino_ui/lib/src/segmented_control.dart | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/cupertino_ui/lib/src/segmented_control.dart b/packages/cupertino_ui/lib/src/segmented_control.dart index 1b2ff06222f0..295852917977 100644 --- a/packages/cupertino_ui/lib/src/segmented_control.dart +++ b/packages/cupertino_ui/lib/src/segmented_control.dart @@ -94,6 +94,7 @@ const Duration _kFadeDuration = Duration(milliseconds: 165); /// * [CupertinoSegmentedControl], a segmented control widget in the style used /// up until iOS 13. /// * +@Deprecated('Use CupertinoSlidingSegmentedControl instead.') class CupertinoSegmentedControl extends StatefulWidget { /// Creates an iOS-style segmented control bar. /// @@ -110,6 +111,7 @@ class CupertinoSegmentedControl extends StatefulWidget { /// If no [groupValue] is provided, or the [groupValue] is null, no widget will /// appear as selected. The [groupValue] must be either null or one of the keys /// in the [children] map. +@Deprecated('Use CupertinoSlidingSegmentedControl instead.') CupertinoSegmentedControl({ super.key, required this.children, From 2a3ab947728be1bf3f82b282276560d5bee72889 Mon Sep 17 00:00:00 2001 From: ValentinVignal Date: Sat, 5 Sep 2026 20:09:16 +0800 Subject: [PATCH 2/3] Update changelog --- ...hange_2026_09_05_deprecate_cupertino_segmented_control.yaml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 packages/cupertino_ui/pending_changelogs/change_2026_09_05_deprecate_cupertino_segmented_control.yaml diff --git a/packages/cupertino_ui/pending_changelogs/change_2026_09_05_deprecate_cupertino_segmented_control.yaml b/packages/cupertino_ui/pending_changelogs/change_2026_09_05_deprecate_cupertino_segmented_control.yaml new file mode 100644 index 000000000000..ad73b16273fe --- /dev/null +++ b/packages/cupertino_ui/pending_changelogs/change_2026_09_05_deprecate_cupertino_segmented_control.yaml @@ -0,0 +1,3 @@ +changelog: | + - Deprecates CupertinoSegmentedControl in favor of CupertinoSlidingSegmentedControl. +version: patch From d793c8ec26e85d41353440161681c1beb5a656c2 Mon Sep 17 00:00:00 2001 From: ValentinVignal Date: Sat, 5 Sep 2026 20:11:43 +0800 Subject: [PATCH 3/3] Fix formatting --- packages/cupertino_ui/lib/src/segmented_control.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/cupertino_ui/lib/src/segmented_control.dart b/packages/cupertino_ui/lib/src/segmented_control.dart index 295852917977..57bdd23090cd 100644 --- a/packages/cupertino_ui/lib/src/segmented_control.dart +++ b/packages/cupertino_ui/lib/src/segmented_control.dart @@ -111,7 +111,7 @@ class CupertinoSegmentedControl extends StatefulWidget { /// If no [groupValue] is provided, or the [groupValue] is null, no widget will /// appear as selected. The [groupValue] must be either null or one of the keys /// in the [children] map. -@Deprecated('Use CupertinoSlidingSegmentedControl instead.') + @Deprecated('Use CupertinoSlidingSegmentedControl instead.') CupertinoSegmentedControl({ super.key, required this.children,