void handlePopRoute()

Called when the system pops the current route.

This first notifies the binding observers (using WidgetsBindingObserver.didPopRoute), in registration order, until one returns true, meaning that it was able to handle the request (e.g. by closing a dialog box). If none return true, then the application is shut down.

WidgetsApp uses this in conjunction with a Navigator to cause the back button to close dialog boxes, return from modal pages, and so forth.

Source

void handlePopRoute() {
  for (WidgetsBindingObserver observer in _observers) {
    if (observer.didPopRoute())
      return;
  }
  SystemNavigator.pop();
}