doFutureHandleError<T> method
Call a future with default error handling
Implementation
@Deprecated('Use try/catch instead')
void doFutureHandleError<T>(
Future<T> future,
void Function(T value) onValue, {
void Function(Object error)? onError,
}) {
// ignore: avoid_types_on_closure_parameters
future.then(onValue).catchError((Object e) {
handleError(e);
onError?.call(e);
});
}