Class

UndoState

Defines an interactable undo history.

Source set: Common
class UndoState internal constructor(private val state: TextFieldState)

Defines an interactable undo history.

Properties

canUndo

Source set: Common
val canUndo: Boolean

Whether it is possible to execute a meaningful undo action right now. If this value is false, calling undo would be a no-op.

canRedo

Source set: Common
val canRedo: Boolean

Whether it is possible to execute a meaningful redo action right now. If this value is false, calling redo would be a no-op.

Functions

undo

fun undo()

Reverts the latest edit action or a group of actions that are merged together. Calling it repeatedly can continue undoing the previous actions.

redo

fun redo()

Re-applies a change that was previously reverted via undo.

clearHistory

fun clearHistory()

Clears all undo and redo history up to this point.

Last updated: