onDidPop method

  1. @mustCallSuper
void onDidPop(
  1. Object? result,
  2. covariant CoordinatorCore<RouteUri>? coordinator
)
inherited

Called when the route is popped from the navigation stack.

This is invoked during navigation cleanup. The route is removed from its path and its result is completed.

Implementation

@mustCallSuper
void onDidPop(Object? result, covariant CoordinatorCore? coordinator) {
  onDiscard();

  if (isPopByPath == false && _path?.stack.contains(this) == true) {
    if (_path case StackMutatable path) {
      path.remove(this, discard: false);
    }
  }

  clearStackPath();
}