CPDFAnnotationHistoryManager class
This class manages the history of annotations being edited in the current document,
providing APIs for undo and redo functionality.
It extends from CPDFHistoryManagerBase to provide the necessary methods for history management.
example:
CPDFAnnotationHistoryManager historyManager = widget.controller.annotationHistoryManager;
historyManager.setOnHistoryChangedListener((canUndo, canRedo) {
// Handle history changes here
print('Can Undo: $canUndo, Can Redo: $canRedo');
// Update UI or perform other actions based on history state
});
// To check if undo or redo is possible
bool canUndo = await historyManager.canUndo();
bool canRedo = await historyManager.canRedo();
// To perform undo or redo actions
await historyManager.undo();
await historyManager.redo();
- Inheritance
-
- Object
- CPDFHistoryManagerBase
- CPDFAnnotationHistoryManager
Constructors
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
-
canRedo(
) → Future< bool> -
Checks if an undo operation is possible.
override -
canUndo(
) → Future< bool> -
Checks if a redo operation is possible.
override -
handleMethodCall(
MethodCall call) → void -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
redo(
) → Future< void> -
Performs a redo operation on the annotation history.
override -
setOnHistoryChangedListener(
CPDFAnnotationHistoryChangedCallback callback) → void -
Sets a callback to be invoked when the annotation history changes.
This callback will receive two boolean parameters:
-
toString(
) → String -
A string representation of this object.
inherited
-
undo(
) → Future< void> -
Performs an undo operation on the annotation history.
example:override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited