timeout method

Observable<T> timeout({
  1. Duration? first,
  2. Duration? between,
  3. Duration? total,
  4. Scheduler? scheduler,
})

totals with a TimeoutError, if the observable fails to emit a value in the given time span.

  • first specifies the max duration until the first value must be emitted.
  • between specifies the max duration between values (or completion).
  • total specifies the max duration until completion.

Implementation

Observable<T> timeout({
  Duration? first,
  Duration? between,
  Duration? total,
  Scheduler? scheduler,
}) =>
    TimeoutObservable<T>(
        this, first, between, total, scheduler ?? defaultScheduler);