toAsync method

Future<Async<T>> toAsync()

Implementation

Future<Async<T>> toAsync() async {
  try {
    final d = await this;
    return Async.ok(d);
  } on Exception catch (e) {
    return Async.error(e);
  }
}