doOnListen method

Observable<T> doOnListen (void onListen())

Invokes the given callback function when the stream is first listened to.

Example

new Observable.just(1)
  .doOnListen(() => print("Is someone there?"))
  .listen(null); // prints "Is someone there?"

Implementation

Observable<T> doOnListen(void onListen()) =>
    transform(new DoStreamTransformer<T>(onListen: onListen));