RestorableCupertinoTabController constructor Null safety

RestorableCupertinoTabController(
  1. {int initialIndex = 0}
)

Creates a RestorableCupertinoTabController to control the tab index of CupertinoTabScaffold and CupertinoTabBar.

The initialIndex must not be null and defaults to 0. The value must be greater than or equal to 0, and less than the total number of tabs.

Implementation

RestorableCupertinoTabController({ int initialIndex = 0 })
  : assert(initialIndex != null),
    assert(initialIndex >= 0),
    _initialIndex = initialIndex;