clearAnnotationSelection method

void clearAnnotationSelection()

Clears all annotation selections.

Triggers the onAnnotationSelected callback with null if there was a selection.

Implementation

void clearAnnotationSelection() {
  final hadSelection = annotations.hasAnnotationSelection;
  annotations.clearAnnotationSelection();

  // Fire selection event with null to indicate no selection
  if (hadSelection) {
    events.annotation?.onSelected?.call(null);
  }
}