clearHistory method

void clearHistory()

Clears snapshots without changing domain state. Notifies history when its metadata changes. Recording stays enabled if it was enabled.

Implementation

void clearHistory() {
  if (!_canChangeHistory) return;
  _undoStack.clear();
  _redoStack.clear();
  _publishHistory();
}