removeWhere method

Iterable<E> removeWhere(
  1. bool test(
    1. E element
    )
)
inherited

Remove all elements that match the test condition; returns the removed elements.

Implementation

Iterable<E> removeWhere(bool Function(E element) test) {
  final elements = where(test).toList(growable: false);
  for (final element in elements) {
    remove(element);
  }
  return elements;
}