handlePageViewChanged method

void handlePageViewChanged(
  1. int currentPageIndex
)

Handles the page view change event and updates the tab index and selected index.

currentPageIndex The index of the currently visible page.

Implementation

void handlePageViewChanged(int currentPageIndex) {
  if (isOnDesktopAndWeb) {
    return;
  }
  tabController.index = currentPageIndex;
  selectedIndex.value = currentPageIndex;
}