asyncTry<R> method

FutureOr<R?> asyncTry<R>(
  1. FutureOr<R?> tryBlock(), {
  2. FutureOr<R?> then(
    1. R? r
    )?,
  3. Function? onError,
  4. FutureOr<void> onFinally()?,
})

Implementation

FutureOr<R?> asyncTry<R>(FutureOr<R?> Function() tryBlock,
    {FutureOr<R?> Function(R? r)? then,
    Function? onError,
    FutureOr<void> Function()? onFinally}) {
  return run(() => async_extension.asyncTry<R>(tryBlock,
      then: then, onError: onError, onFinally: onFinally));
}