setUndoController method

void setUndoController(
  1. UndoRedoController? controller
)

Sets the undo controller for this editor.

The undo controller manages the undo/redo history for text operations. Pass null to disable undo/redo functionality.

Implementation

void setUndoController(UndoRedoController? controller) {
  _undoController = controller;
  if (controller != null) {
    controller.setApplyEditCallback(_applyUndoRedoOperation);
  }
}