notifyStatusListeners method

void notifyStatusListeners(
  1. PagingStatus status
)

Calls all the status listeners.

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

Implementation

void notifyStatusListeners(PagingStatus status) {
  assert(_debugAssertNotDisposed());

  if (_statusListeners!.isEmpty) {
    return;
  }

  final localListeners = List<PagingStatusListener>.from(_statusListeners!);
  localListeners.forEach((listener) {
    if (_statusListeners!.contains(listener)) {
      listener(status);
    }
  });
}