removeAll method
Removes each element of elements
from this set.
final characters = <String>{'A', 'B', 'C'};
characters.removeAll({'A', 'B', 'X'});
print(characters); // {C}
Implementation
@override
void removeAll(Iterable<Object?> elements) {
// Stop listening to the element that will be replaced
for (E element in elements as Iterable<E>) {
if (_propagateNotification &&
element != null &&
element is ChangeNotifier) {
element.removeListener(_propagate);
}
}
_values.removeAll(elements);
notifyListeners();
}