toFuture method

Future<D> toFuture()

Converts Result to Future

Implementation

Future<D> toFuture() => when(ok: (data) => Future<D>.value(data), error: (error) => Future.error(error));