internalUpdateNodeShapeBuilder method
Updates the node shape builder on an already-initialized controller.
@internal - This method is for internal use by NodeFlowEditor only. Do not call directly from application code.
This also updates the spatial index callback to use the new builder.
Implementation
void internalUpdateNodeShapeBuilder(
NodeShape? Function(Node<T> node)? builder,
) {
_nodeShapeBuilder = builder;
_spatialIndex.nodeShapeBuilder = builder;
// Update connection painter if it exists
_connectionPainter?.updateNodeShape(
builder != null ? (node) => builder(node as Node<T>) : null,
);
}