flush method

bool flush()

Compute the provider (if it needs to be recomputed) and returns whether a new value was created or not.

Implementation

bool flush() {
  if (_listener.list == null) {
    throw StateError(
      'Cannot call ProviderSubscription.flush() after close was called',
    );
  }
  _listener.element.flush();
  return _listener.element._notificationCount >
      _listener.lastNotificationCount;
}