filter method
- bool f(
- T t
override
If this Option is a Some and calling f
returns true
, then return this Some.
Otherwise return None.
Implementation
@override
Option<T> filter(bool Function(T t) f) =>
flatMap((t) => f(t) ? this : const Option.none());