onNodeMoved method
Called when a node's position changes.
Override this method to respond when a tracked node moves.
The nodeId is the node that moved, newPosition is its new position.
The context provides access to node data for operations like refitting.
For GroupAnnotation with explicit behavior, this triggers a refit.
Example
@override
void onNodeMoved(String nodeId, Offset newPosition, AnnotationDragContext context) {
if (_trackedNodeIds.contains(nodeId)) {
_updateBoundsForNode(nodeId, newPosition);
}
}
Implementation
void onNodeMoved(
String nodeId,
Offset newPosition,
AnnotationDragContext context,
) {
// Default implementation does nothing
}