@@ -101,16 +101,20 @@ class TabController extends ChangeNotifier {
101101 ///
102102 /// The `initialIndex` must be valid given [length] and must not be null. If
103103 /// [length] is zero, then `initialIndex` must be 0 (the default).
104- TabController ({ int initialIndex = 0 , Duration ? animationDuration, required this .length, required TickerProvider vsync})
105- : assert (length >= 0 ),
106- assert (initialIndex >= 0 && (length == 0 || initialIndex < length)),
107- _index = initialIndex,
108- _previousIndex = initialIndex,
109- _animationDuration = animationDuration ?? kTabScrollDuration,
110- _animationController = AnimationController .unbounded (
111- value: initialIndex.toDouble (),
112- vsync: vsync,
113- );
104+ TabController ({
105+ int initialIndex = 0 ,
106+ Duration ? animationDuration,
107+ required this .length,
108+ required TickerProvider vsync,
109+ }) : assert (length >= 0 ),
110+ assert (initialIndex >= 0 && (length == 0 || initialIndex < length)),
111+ _index = initialIndex,
112+ _previousIndex = initialIndex,
113+ _animationDuration = animationDuration ?? kTabScrollDuration,
114+ _animationController = AnimationController .unbounded (
115+ value: initialIndex.toDouble (),
116+ vsync: vsync,
117+ );
114118
115119 // Private constructor used by `_copyWith`. This allows a new TabController to
116120 // be created without having to create a new animationController.
0 commit comments