index property

int index

The index of the currently selected tab.

Changing the value of index updates the actively displayed tab of the CupertinoTabScaffold controlled by this CupertinoTabController, as well as the currently selected tab item of its CupertinoTabScaffold.tabBar.

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

Implementation

int get index => _index;
void index=(int value)

Implementation

set index(int value) {
  assert(value >= 0);
  if (_index == value) {
    return;
  }
  _index = value;
  notifyListeners();
}