addAnnotation method

void addAnnotation(
  1. AnnotationAction annotationAction
)

Adds a new annotation to the current page. Clears the redo stack as a new action breaks the redo chain.

Implementation

void addAnnotation(AnnotationAction annotationAction) {
  _highlightHistory[_currentPage]!.add(annotationAction);
  _highlightUndoStack[_currentPage]!.clear();
  notifyListeners();
}