notifyChange method

void notifyChange([
  1. T? previous,
  2. T? next
])

Notifies the streams about a new value (or forces the notification without equality check).

Implementation

void notifyChange([T? previous, T? next]) {
  if (_isInactive) return;
  if ((!_hasStreamListener || _streamController!.isClosed) &&
      (!_hasChangeListener || _changeController!.isClosed)) {
    return;
  }
  if (_coalesce) {
    _doCoalesce(previous, next);
  } else {
    _doNotifyChange(previous, next);
  }
}