clear method

  1. @override
void clear()
override

Removes all objects from this list; the length of the list becomes zero.

The list must be growable.

Implementation

@override
void clear() {
  if (lock) return super.clear();
  if (isNotEmpty) {
    lock = true;
    added = const {};
    removed = super.asMap();
    changed = const {};
    super.clear();
    notifyListeners();
  }
}