complete method

  1. @override
void complete()
override

Pass completion to the observer.

Implementation

@override
void complete() {
  DisposedError.checkNotDisposed(this);
  if (_hasStopped) {
    return;
  }
  _hasStopped = true;
  for (final observer in [..._observers]) {
    observer.complete();
  }
  _observers.clear();
}