switchTo method
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();
});
}
}