listenOn method
StreamSubscription<T?>
listenOn(
- WidgetModel listener, {
- void onValue(
- T? value
- void onError(
- Object error
Listen on specifited listener with possibility to add callbacks
Implementation
StreamSubscription<T?> listenOn(
WidgetModel listener, {
void Function(T? value)? onValue,
void Function(Object error)? onError,
}) {
return listener.subscribe<T>(this, onValue ?? (_) {}, onError: onError);
}