listenCatchError method

StreamSubscription<T?> listenCatchError(
  1. WidgetModel listener, {
  2. void onValue(
    1. T? value
    )?,
  3. void onError(
    1. Object error
    )?,
})

Listen on WM with error catching

Implementation

StreamSubscription<T?> listenCatchError(
  WidgetModel listener, {
  void Function(T? value)? onValue,
  void Function(Object error)? onError,
}) {
  return listener.subscribeHandleError<T>(
    this,
    onValue ?? (_) {},
    onError: onError,
  );
}