UndoManager class
A low-level interface to the system's undo manager.
To receive events from the system undo manager, create an UndoManagerClient and set it as the client on UndoManager.
The setUndoState method can be used to update the system's undo manager
using the canUndo
and canRedo
parameters.
When the system undo or redo button is tapped, the current UndoManagerClient will receive UndoManagerClient.handlePlatformUndo with an UndoDirection representing whether the event is "undo" or "redo".
Currently, only iOS has an UndoManagerPlugin implemented on the engine side. On iOS, this can be used to listen to the keyboard undo/redo buttons and the undo/redo gestures.
See also:
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- client ↔ UndoManagerClient?
-
Return the current UndoManagerClient.
getter/setter pair
Static Methods
-
setChannel(
MethodChannel newChannel) → void - Set the MethodChannel used to communicate with the system's undo manager.
-
setUndoState(
{bool canUndo = false, bool canRedo = false}) → void -
Set the current state of the system UndoManager.
canUndo
andcanRedo
control the respective "undo" and "redo" buttons of the system UndoManager.