void clear()

Removes all elements in the set.

Source

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