clear method

void clear()
override

Clear all the child nodes from children. The children will be empty after this operation.

The ValueListenable and removedNodes listeners will also be notified on this operation

Implementation

void clear() {
  final clearedNodes = childrenAsList;
  super.clear();
  _notifyListeners();
  _notifyNodesRemoved(NodeRemoveEvent(List.from(clearedNodes)));
}