clearAllPages method

dynamic clearAllPages()

Clears all pages' content (text boxes, history, undo stack).

Implementation

clearAllPages() {
  _history.clear();
  _undoStack.clear();
  _textBoxes.clear();
  setPage(0); // Reset to page 0.
  notifyListeners(); // Notify listeners after clearing all pages.
}