andThen<U extends Object> method

Option<U> andThen<U extends Object>(
  1. Option<U> op(
    1. T
    )
)
inherited

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

Implementation

Option<U> andThen<U extends Object>(Option<U> Function(T) op) {
  final val = toNullable();
  return val != null ? op(val) : None<U>();
}