timeout method

  1. @override
Observable<T> timeout(
  1. Duration timeLimit,
  2. {void onTimeout(
    1. EventSink<T> sink

The Timeout operator allows you to abort an Observable with an onError termination if that Observable fails to emit any items during a specified duration. You may optionally provide a callback function to execute on timeout.


Observable<T> timeout(Duration timeLimit,
        {void onTimeout(EventSink<T> sink)}) =>
    Observable<T>(_stream.timeout(timeLimit, onTimeout: onTimeout));