index property
The index of the currently selected tab.
Changing the index also updates previousIndex, sets the animation's value to index, resets indexIsChanging to false, and notifies listeners.
To change the currently selected tab and play the animation use animateTo.
The value of index must be valid given length. If length is zero, then index will also be zero.
Implementation
int get index => _index;
Sets the current tab index and notifies the attached MotionTabBar (via onTabChange) so it animates to the new tab.
Implementation
@override
set index(int index) {
super.index = index;
_changeIndex?.call(index);
}