filter method

Stream<List<T>> filter(
  1. bool where(
    1. T
    )
)

Filters each emitted list in the stream based on the provided where predicate.

Returns a new Stream where each List<T> contains only the elements that satisfy where.

Implementation

Stream<List<T>> filter(bool Function(T) where) {
  return map((items) => items.where(where).toList());
}