notifyPageRequestListeners method

void notifyPageRequestListeners(
  1. PageKeyType pageKey
)

Calls all the page request listeners.

If listeners are added or removed during this function, the modifications will not change which listeners are called during this iteration.

Implementation

void notifyPageRequestListeners(PageKeyType pageKey) {
  assert(_debugAssertNotDisposed());

  if (_pageRequestListeners!.isEmpty) {
    return;
  }

  final localListeners =
      List<PageRequestListener<PageKeyType>>.from(_pageRequestListeners!);

  localListeners.forEach((listener) {
    if (_pageRequestListeners!.contains(listener)) {
      listener(pageKey);
    }
  });
}