where method
Performs a filter operation and returns a new instance of T.
Implementation
Iterable<T> where(
bool Function(T) predicate, {
required Iterable<T> Function(E) onError,
}) =>
match(
onSuccess: (list) => list.where(predicate),
onError: onError,
);