filter method

Iterable<T> filter(
  1. Filter<T>? filter
)

Filters the iterable using the given filter. If filter is null, returns the original iterable.

Implementation

Iterable<T> filter(Filter<T>? filter) {
  if (filter == null) return this;
  return where((item) => filter.matches(item));
}