clear method

void clear()

Clears all content (text boxes, history, undo stack) for the current page.

Implementation

void clear() {
  _textBoxes[_currentPage] = [];
  _history[_currentPage] = [];
  _undoStack[_currentPage] = [];
  notifyListeners(); // Notify listeners after clearing.
}