filter method

List<E> filter(
  1. bool condition(
    1. E item
    )
)

Returns a new list containing items that satisfy the condition.

Implementation

List<E> filter(bool Function(E item) condition) {
  return List.from(_items.value.where(condition));
}