switchToTab method

void switchToTab(
  1. int index
)

Implementation

void switchToTab(int index) {
  if (index >= 0 && index < _tabs.length) {
    _currentTab?.onSave(_currentTab!._state);
    _currentTab = _tabs[index];
    _currentTabChangedSubject.sink.add(_currentTab);
  }

  if (switcherActive) {
    switcherActive = false;
  }
}