executeProtectedAsyncResult<S> function

FutureResult<S, Object> executeProtectedAsyncResult<S>(
  1. Future<Result<S, Object>> func()
)

Async version of executeProtectedResult

Implementation

FutureResult<S, Object> executeProtectedAsyncResult<S>(Future<Result<S,Object>> Function() func) async {
  try {
    return await func();
  } catch (e) {
    return Err(e);
  }
}