HighlightController class
A controller that manages highlight and underline annotations in a PDF document using the Syncfusion PDF viewer.
Supports undo/redo operations, page-based history, and dynamic page adjustments.
- Inheritance
-
- Object
- ChangeNotifier
- HighlightController
Constructors
Properties
-
getHighlightHistory
→ Map<
int, List< AnnotationAction> > -
Returns the highlight history map.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addAnnotation(
AnnotationAction annotationAction) → void - Adds a new annotation to the current page. Clears the redo stack as a new action breaks the redo chain.
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
adjustPages(
int pageIndex, PdfViewerController pdfViewerController, {bool isAdd = true}) → Future< void> - Adjusts the highlight and undo stacks when pages are added or removed.
-
clear(
PdfViewerController pdfViewerController) → void - Clears all highlights/underlines from the current page.
-
clearAllPages(
PdfViewerController pdfViewerController) → void - Clears all highlights/underlines across all pages.
-
dispose(
) → void -
Discards any resources used by the object. After this is called, the
object is not in a usable state and should be discarded (calls to
addListener will throw after the object is disposed).
inherited
-
hasClearContent(
) → bool - Checks if there are any annotations (in history or undo stack) to clear.
-
hasContent(
{bool isRedo = false}) → bool - Checks if there are any annotations available to undo or redo.
-
hide(
PdfViewerController pdfViewerController) → void - Temporarily hides all highlights/underlines on the current page.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
redo(
PdfViewerController pdfViewerController) → void - Redoes the last undone highlight/underline action on the current page.
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
setPage(
int page) → void - Sets the current page and initializes history stacks if not already present.
-
toString(
) → String -
A string representation of this object.
inherited
-
undo(
PdfViewerController pdfViewerController) → void - Undoes the last highlight/underline action on the current page.
-
unhide(
PdfViewerController pdfViewerController) → void - Restores (unhides) all highlights/underlines on the current page.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited