removeAnnotation method
Removes an annotation from the graph.
Triggers the onAnnotationDeleted callback after successful removal.
Parameters:
annotationId: The ID of the annotation to remove
Implementation
void removeAnnotation(String annotationId) {
final annotationToDelete = annotations.getAnnotation(annotationId);
annotations.removeAnnotation(annotationId);
// Fire event after successful removal
if (annotationToDelete != null) {
events.annotation?.onDeleted?.call(annotationToDelete);
}
}