redo method

bool redo()

Redo the last undone operation

Implementation

bool redo() {
  if (!canRedo || _applyEdit == null) return false;

  final operation = _redoStack.removeLast();

  _isUndoRedoInProgress = true;
  try {
    _applyEdit!(operation);
    _undoStack.add(operation);
  } finally {
    _isUndoRedoInProgress = false;
  }

  notifyListeners();
  return true;
}