NodeApi<T> extension

Node-related operations for NodeFlowController.

This extension provides comprehensive APIs for working with nodes:

Model APIs

Port APIs

Visual Query APIs

Mutation APIs

Selection APIs

Z-Order APIs

Layout APIs

on

Properties

nodeCount int

Available on NodeFlowController<T>, provided by the NodeApi extension

Gets the total number of nodes in the graph.
no setter
nodeIds Iterable<String>

Available on NodeFlowController<T>, provided by the NodeApi extension

Gets all node IDs in the graph.
no setter

Methods

addInputPort(String nodeId, Port port) → void

Available on NodeFlowController<T>, provided by the NodeApi extension

Adds an input port to an existing node.
addNode(Node<T> node) → void

Available on NodeFlowController<T>, provided by the NodeApi extension

Adds a new node to the graph.
addOutputPort(String nodeId, Port port) → void

Available on NodeFlowController<T>, provided by the NodeApi extension

Adds an output port to an existing node.
alignNodes(List<String> nodeIds, NodeAlignment alignment) → void

Available on NodeFlowController<T>, provided by the NodeApi extension

Aligns multiple nodes according to the specified alignment option.
bringNodeForward(String nodeId) → void

Available on NodeFlowController<T>, provided by the NodeApi extension

Moves a node one step forward in the z-order.
bringNodeToFront(String nodeId) → void

Available on NodeFlowController<T>, provided by the NodeApi extension

Brings a node to the front of the z-order (renders on top of all other nodes).
clearNodeSelection() → void

Available on NodeFlowController<T>, provided by the NodeApi extension

Clears all node selections.
deleteNodes(List<String> nodeIds) → void

Available on NodeFlowController<T>, provided by the NodeApi extension

Deletes multiple nodes from the graph.
distributeNodesHorizontally(List<String> nodeIds) → void

Available on NodeFlowController<T>, provided by the NodeApi extension

Distributes nodes evenly along the horizontal axis.
distributeNodesVertically(List<String> nodeIds) → void

Available on NodeFlowController<T>, provided by the NodeApi extension

Distributes nodes evenly along the vertical axis.
duplicateNode(String nodeId) → void

Available on NodeFlowController<T>, provided by the NodeApi extension

Creates a duplicate of a node and adds it to the graph.
getHiddenNodes() List<Node<T>>

Available on NodeFlowController<T>, provided by the NodeApi extension

Gets all hidden nodes in the graph.
getInputPorts(String nodeId) List<Port>

Available on NodeFlowController<T>, provided by the NodeApi extension

Gets all input ports for a node.
getNode(String nodeId) Node<T>?

Available on NodeFlowController<T>, provided by the NodeApi extension

Gets a node by its ID.
getNodeBounds(String nodeId) Rect?

Available on NodeFlowController<T>, provided by the NodeApi extension

Gets the bounding rectangle for a specific node.
getNodesByType(String type) List<Node<T>>

Available on NodeFlowController<T>, provided by the NodeApi extension

Gets all nodes of a specific type.
getOutputPorts(String nodeId) List<Port>

Available on NodeFlowController<T>, provided by the NodeApi extension

Gets all output ports for a node.
getPort(String nodeId, String portId) Port?

Available on NodeFlowController<T>, provided by the NodeApi extension

Gets a specific port from a node.
getPortWorldPosition(String nodeId, String portId) Offset?

Available on NodeFlowController<T>, provided by the NodeApi extension

Gets the world position of a port.
getVisibleNodes() List<Node<T>>

Available on NodeFlowController<T>, provided by the NodeApi extension

Gets all visible nodes in the graph.
hideAllNodes() → void

Available on NodeFlowController<T>, provided by the NodeApi extension

Hides all nodes in the graph.
hideSelectedNodes() → void

Available on NodeFlowController<T>, provided by the NodeApi extension

Hides all currently selected nodes.
isNodeSelected(String nodeId) bool

Available on NodeFlowController<T>, provided by the NodeApi extension

Checks if a node is currently selected.
moveNode(String nodeId, Offset delta) → void

Available on NodeFlowController<T>, provided by the NodeApi extension

Moves a node by the specified delta.
moveSelectedNodes(Offset delta) → void

Available on NodeFlowController<T>, provided by the NodeApi extension

Moves all selected nodes by the specified delta.
rebuildAllConnectionSegments() → void

Available on NodeFlowController<T>, provided by the NodeApi extension

Rebuilds the entire connection spatial index using accurate path segments.
rebuildConnectionSegmentsForNodes(List<String> nodeIds) → void

Available on NodeFlowController<T>, provided by the NodeApi extension

Rebuilds connection spatial index using accurate path segments. Call this after drag ends to restore accurate hit-testing.
removeNode(String nodeId) → void

Available on NodeFlowController<T>, provided by the NodeApi extension

Removes a node from the graph along with all its connections.
removePort(String nodeId, String portId) → void

Available on NodeFlowController<T>, provided by the NodeApi extension

Removes a port from a node and all connections involving that port.
selectNode(String nodeId, {bool toggle = false}) → void

Available on NodeFlowController<T>, provided by the NodeApi extension

Selects a node in the graph.
selectNodes(List<String> nodeIds, {bool toggle = false}) → void

Available on NodeFlowController<T>, provided by the NodeApi extension

Selects multiple nodes in the graph.
sendNodeBackward(String nodeId) → void

Available on NodeFlowController<T>, provided by the NodeApi extension

Moves a node one step backward in the z-order.
sendNodeToBack(String nodeId) → void

Available on NodeFlowController<T>, provided by the NodeApi extension

Sends a node to the back of the z-order (renders behind all other nodes).
setNodePorts(String nodeId, {List<Port>? inputPorts, List<Port>? outputPorts}) → void

Available on NodeFlowController<T>, provided by the NodeApi extension

Sets the input and/or output ports of a node.
setNodePosition(String nodeId, Offset position) → void

Available on NodeFlowController<T>, provided by the NodeApi extension

Sets a node's position to an absolute position.
setNodeSize(String nodeId, Size size) → void

Available on NodeFlowController<T>, provided by the NodeApi extension

Sets the size of a node.
setNodesVisibility(List<String> nodeIds, bool visible) → void

Available on NodeFlowController<T>, provided by the NodeApi extension

Sets visibility for multiple nodes at once.
setNodeVisibility(String nodeId, bool visible) → void

Available on NodeFlowController<T>, provided by the NodeApi extension

Sets the visibility of a specific node.
showAllNodes() → void

Available on NodeFlowController<T>, provided by the NodeApi extension

Shows all nodes in the graph.
showSelectedNodes() → void

Available on NodeFlowController<T>, provided by the NodeApi extension

Shows all currently selected nodes.
toggleNodeVisibility(String nodeId) bool?

Available on NodeFlowController<T>, provided by the NodeApi extension

Toggles visibility of a specific node.