subscribe method

  1. @override
Disposable subscribe(
  1. Observer<T> observer
)
override

Subscribes with the provided observer.

Implementation

@override
Disposable subscribe(Observer<T> observer) {
  if (_hasCompleted && _hasValue) {
    observer.next(_value);
    observer.complete();
    return const DisposedDisposable();
  }
  return super.subscribe(observer);
}