timeout method

  1. @override
Observable<T> timeout (Duration timeLimit, { void onTimeout(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.

Implementation

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