andThenAsync<U extends Object> method

Future<Option<U>> andThenAsync<U extends Object>(
  1. FutureOr<Option<U>> op(
    1. T
    )
)

Returns None if the option is None, otherwise asynchronously calls op with the wrapped value and returns the result.

Implementation

Future<Option<U>> andThenAsync<U extends Object>(
  FutureOr<Option<U>> Function(T) op,
) {
  return Future.value(this).then((option) => option.match(op, None.new));
}