CupertinoTabController constructor Null safety

CupertinoTabController(
  1. {int initialIndex = 0}
)

Creates a CupertinoTabController 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

CupertinoTabController({ int initialIndex = 0 })
  : _index = initialIndex,
    assert(initialIndex != null),
    assert(initialIndex >= 0);