From 1f489de409bdbf18340a8474b1e5cb199d669185 Mon Sep 17 00:00:00 2001 From: LongCatIsLooong <31859944+LongCatIsLooong@users.noreply.github.com> Date: Wed, 17 Jul 2024 10:55:13 -0700 Subject: [PATCH] Make `CupertinoSlidingSegmentedControl` type parameter non-null (#151803) `null` is reserved for when there is no selected segment. --- .../lib/src/cupertino/sliding_segmented_control.dart | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/flutter/lib/src/cupertino/sliding_segmented_control.dart b/packages/flutter/lib/src/cupertino/sliding_segmented_control.dart index 0eead27f7e..f760f6802a 100644 --- a/packages/flutter/lib/src/cupertino/sliding_segmented_control.dart +++ b/packages/flutter/lib/src/cupertino/sliding_segmented_control.dart @@ -299,7 +299,7 @@ class _SegmentSeparatorState extends State<_SegmentSeparator> with TickerProvide /// See also: /// /// * -class CupertinoSlidingSegmentedControl extends StatefulWidget { +class CupertinoSlidingSegmentedControl extends StatefulWidget { /// Creates an iOS-style segmented control bar. /// /// The [children] argument must be an ordered [Map] such as a @@ -411,7 +411,7 @@ class CupertinoSlidingSegmentedControl extends StatefulWidget { State> createState() => _SegmentedControlState(); } -class _SegmentedControlState extends State> +class _SegmentedControlState extends State> with TickerProviderStateMixin> { late final AnimationController thumbController = AnimationController(duration: _kSpringAnimationDuration, value: 0, vsync: this); Animatable? thumbAnimatable; @@ -709,7 +709,7 @@ class _SegmentedControlState extends State extends MultiChildRenderObjectWidget { +class _SegmentedControlRenderWidget extends MultiChildRenderObjectWidget { const _SegmentedControlRenderWidget({ super.key, super.children, @@ -778,7 +778,7 @@ class _SegmentedControlContainerBoxParentData extends ContainerBoxParentData extends RenderBox +class _RenderSegmentedControl extends RenderBox with ContainerRenderObjectMixin>, RenderBoxContainerDefaultsMixin> { _RenderSegmentedControl({