isSomeAnd method

bool isSomeAnd(
  1. bool f(
    1. T
    )
)

Returns true if the option is a Some and the value inside of it matches a predicate.

Implementation

@pragma("vm:prefer-inline")
bool isSomeAnd(bool Function(T) f) {
  if (v == null) {
    return false;
  } else {
    return f(v!);
  }
}