getNodeBounds method

Rect? getNodeBounds(
  1. String nodeId
)

Gets the bounding rectangle for a specific node.

Returns null if the node doesn't exist.

Example:

final bounds = controller.getNodeBounds('node1');
if (bounds != null) {
  print('Node size: ${bounds.width} x ${bounds.height}');
}

Implementation

Rect? getNodeBounds(String nodeId) {
  final node = _nodes[nodeId];
  if (node == null) return null;

  return node.getBounds();
}