registerPopEntry method

void registerPopEntry(
  1. PopEntry<Object?> popEntry
)

Registers the existence of a PopEntry in the route.

PopEntry instances registered in this way will have their PopEntry.onPopInvokedWithResult callbacks called when a route is popped or a pop is attempted. They will also be able to block pop operations with PopEntry.canPopNotifier through this route's popDisposition method.

See also:

Implementation

void registerPopEntry(PopEntry<Object?> popEntry) {
  _popEntries.add(popEntry);
  popEntry.canPopNotifier.addListener(_maybeDispatchNavigationNotification);
  _maybeDispatchNavigationNotification();
}