withErrorHandling method

  1. @Deprecated('Will be removed because of deprecation of `doFutureHandleError`')
Future<T> withErrorHandling(
  1. WidgetModel listener
)

Do future with error catching on specified listener

Implementation

@Deprecated('Will be removed because of deprecation of `doFutureHandleError`')
Future<T> withErrorHandling(WidgetModel listener) {
  final completer = Completer<T>();
  listener.doFutureHandleError<T>(
    this,
    completer.complete,
    onError: completer.completeError,
  );

  return completer.future;
}