subscribe method
Subscribes with the provided observer
.
Implementation
@override
Disposable subscribe(Observer<T> observer) {
DisposedError.checkNotDisposed(this);
if (_hasError) {
return subscribeToError(observer, _error, _stackTrace);
} else if (_hasStopped) {
return subscribeToComplete(observer);
} else {
return subscribeToActive(observer);
}
}