isSomeAnd method

  1. @override
  2. @useResult
bool isSomeAnd(
  1. bool condition(
    1. T value
    )
)
override

Returns true if this is a Some with a contained value that satisfies condition.

Examples

// prints "true"
print(const Some(2).isSomeAnd((value) => value == 2));

// prints "false"
print(const None<int>().isSomeAnd((value) => value == 2));

Implementation

@override
@useResult
bool isSomeAnd(bool Function(T value) condition) => false;