doOnData method

Observable<T> doOnData (void onData(T event))

Invokes the given callback function when the stream emits an item. In other implementations, this is called doOnNext.

Example

new Observable.fromIterable([1, 2, 3])
  .doOnData(print)
  .listen(null); // prints 1, 2, 3

Implementation

Observable<T> doOnData(void onData(T event)) =>
    transform(new DoStreamTransformer<T>(onData: onData));