setNodeVisibility method

void setNodeVisibility(
  1. String nodeId,
  2. bool visible
)

Sets the visibility of a specific node.

When a node is hidden:

  • It is not rendered on the canvas
  • Its ports cannot participate in new connections
  • Existing connections to/from this node are not rendered
  • The node is excluded from hit testing

Implementation

void setNodeVisibility(String nodeId, bool visible) {
  final node = _nodes[nodeId];
  if (node == null) return;

  runInAction(() {
    node.isVisible = visible;
  });
}