onPressAppBarBackButton method

void onPressAppBarBackButton(
  1. BuildContext context
)

call this method when back button present on the appbar of page view is pressed

Implementation

void onPressAppBarBackButton(BuildContext context) {
  if (isUserOnTheFirstPage) {
    maybePop();
  } else {
    goToPreviousPage();
  }
}