DoSingleExtensions<T> extension

Extends the Single class with the ability to execute a callback function at different points in the Single's lifecycle.

on

Methods

doOnCancel(FutureOr<void> onCancel()) Single<T>
Invokes the given callback function when the Single subscription is cancelled. Often called doOnUnsubscribe or doOnDispose in other implementations.
doOnData(void onData(T event)) Single<T>
Invokes the given callback function when the Single emits an item. In other implementations, this is called doOnNext.
doOnError(void onError(Object, StackTrace)) Single<T>
Invokes the given callback function when the Single emits an error.
doOnListen(void onListen()) Single<T>
Invokes the given callback function when the Single is first listened to.