removeAll method

void removeAll(
  1. Iterable<Object?> elements
)
override

Removes each element of elements from this set.

final characters = <String>{'A', 'B', 'C'};
characters.removeAll({'A', 'B', 'X'});
print(characters); // {C}

Implementation

void removeAll(Iterable<Object?> elements) {
  for (Object? element in elements) {
    if (_validKey(element)) _remove(element as E);
  }
}