complete method
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();
}