onPopPage method

bool onPopPage(
  1. Route route,
  2. dynamic result,
  3. Routemaster routemaster
)

Passed to Navigator widgets for the Navigator to inform this stack when a page is popped.

Implementation

bool onPopPage(
    Route<dynamic> route, dynamic result, Routemaster routemaster) {
  if (route.didPop(result)) {
    _pageContainers.removeLast();

    routemaster.history._onPopPage(
      newRoute: _pageContainers.last.routeData,
    );

    // We don't need to call notifyListeners() listeners, the Navigator will
    // rebuild its page list automatically.
    return true;
  }

  return false;
}