onDragStart method

void onDragStart(
  1. AnnotationDragContext context
)

Called when a drag operation starts on this annotation.

Override this method to perform setup when the user begins dragging this annotation. Use the context to capture state, such as which nodes are contained within a group annotation.

Example

Set<String>? _containedNodeIds;

@override
void onDragStart(AnnotationDragContext context) {
  _containedNodeIds = context.findNodesInBounds(bounds);
}

Implementation

void onDragStart(AnnotationDragContext context) {
  // Default implementation does nothing
}