runGuardedAsync<R> method
Implementation
Future<R> runGuardedAsync<R>(FutureOr<R> Function() action) {
var completer = Completer<R>();
runGuarded(() {
try {
var r = action();
completer.complete(r);
} catch (e, s) {
completer.completeError(e, s);
}
});
return completer.future;
}