where method
Returns a Some of the original value if this
is a Some and its contained value satisfies
condition
, or None otherwise.
Examples
// prints "Some(2)"
print(const Some(2).where((value) => true));
// prints "None"
print(const Some(2).where((value) => false));
Implementation
@override
@useResult
None<T> where(bool Function(T value) condition) => this;