filter method
Returns None if the predicate noFutures returns false.
Otherwise, returns the original Option.
⚠️ Callback must not throw
Option<T> has no Err variant. Throwing predicates escape to the
caller. If your predicate can fail, lift it via Sync(() => p(value)).
Implementation
@override
@pragma('vm:prefer-inline')
Option<T> filter(@noFutures bool Function(T value) noFutures) {
return noFutures(value) ? this : const None();
}