clear method

void clear(
  1. PdfViewerController pdfViewerController
)

Clears all highlights/underlines from the current page.

Implementation

void clear(PdfViewerController pdfViewerController) {
  _highlightHistory[_currentPage]?.forEach((action) {
    pdfViewerController.removeAnnotation(action.annotation);
  });
  _highlightHistory[_currentPage]?.clear();
  _highlightUndoStack[_currentPage]?.clear();
  notifyListeners();
}