andThen<U extends Object> method

Future<Option<U>> andThen<U extends Object>(
  1. FutureOr<Option<U>> f(
    1. T
    )
)

Implementation

@pragma("vm:prefer-inline")
Future<Option<U>> andThen<U extends Object>(
    FutureOr<Option<U>> Function(T) f) {
  return then(
      (option) => option.isSome() ? f(option.v as T) : Future.value(None));
}