Check if there is content available for undo/redo
bool hasContent({bool isRedo = false}) { return isRedo ? _undoStack[_currentPage]?.isNotEmpty == true : _history[_currentPage]?.isNotEmpty == true; }