clear method Null safety

void clear ()
override

Removes all elements in the set.

Implementation

void clear() {
  removeAll(toList());
}