clear method

  1. @override
void clear()
override

Removes all elements from the set.

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

Implementation

@override
void clear() {
  if (length > 0) {
    // Stop listening to children
    _stopPropagateNotification();
    _values.clear();
    notifyListeners();
  }
}