switchTo method

void switchTo(
  1. int index,
  2. int totalPages
)

Implementation

void switchTo(
  int index,
  int totalPages,
  //{bool notify = true}
) {
  // if (index < 0 || index >= totalPages || index == _currentIndex) return;

  _currentIndex = index;
  _markAsUsed(index);
  _notifyListeners();

  if (disposeUnused) {
    WidgetsBinding.instance.addPostFrameCallback((_) {
      _enforceMaxSize();
      _notifyListeners();
    });
  }
}