removeAll method

void removeAll(
  1. Iterable<Object?> other
)

Removes all elements that are present in both this list and other.

It's time-complexity is O(n²) if other's contains method is O(n). When possible, clear should be used instead.

[1, 2, 3]..removeAll([1, 2, 4]); // [3]

Implementation

void removeAll(Iterable<Object?> other) => removeWhere(other.contains);