runErrorFuture<T> method
Implementation
Future<T> runErrorFuture<T>(Future<T> future,
{Object? key, bool throwException = false}) async {
try {
setErrorForModelOrObject(null, key: key);
return await future;
} catch (e) {
setErrorForModelOrObject(e, key: key);
onFutureError(e, key);
if (throwException) rethrow;
return Future.value();
}
}