Observer<T> constructor
Observer<T> ({
- NextCallback<
T> ? next, - ErrorCallback? error,
- CompleteCallback? complete,
- bool ignoreErrors = false,
An observer with custom handlers:
nextis a callback that is called zero or more times with values of typeT.erroris a callback that is called when the observer terminates with an exception and an optional stack trace. If you do not provide an this callback the error is passed to the defaultErrorHandler, unlessignoreErrorsis set totrue.completeis a callback that is called when the observer successfully terminates.
Implementation
factory Observer({
NextCallback<T>? next,
ErrorCallback? error,
CompleteCallback? complete,
bool ignoreErrors = false,
}) =>
BaseObserver<T>(
next ?? emptyFunction1,
error ?? (ignoreErrors ? emptyFunction2 : defaultErrorHandler),
complete ?? emptyFunction0);