handlePageChange method Null safety

Future<bool> handlePageChange(
  1. int oldPageIndex,
  2. int newPageIndex
)

Called when the page is navigated.

Return true, if the navigation should be performed. Otherwise, return false to disable the navigation for specific page index.

Implementation

Future<bool> handlePageChange(int oldPageIndex, int newPageIndex) async {
  return true;
}