Checks if there is content to undo or redo.
bool hasContent({bool isRedo = false}) { if (isRedo) { return _undoStack[_currentPage]?.isNotEmpty == true; } return _history[_currentPage]?.isNotEmpty == true; }