NodeApi<T> extension
Node-related operations for NodeFlowController.
This extension provides comprehensive APIs for working with nodes:
Model APIs
- getNode,
getNodeIds, nodeCount - Lookup operations - addNode, removeNode, duplicateNode, deleteNodes - CRUD operations
Port APIs
- getPort, getPortWorldPosition - Port lookup
- addInputPort, addOutputPort, removePort, setNodePorts - Port CRUD
Visual Query APIs
- getNodeBounds - Node bounds queries (graph bounds are in GraphApi and ViewportApi)
- getVisibleNodes, getHiddenNodes - Visibility queries
- (Graph analysis methods like getOrphanNodes are in GraphApi)
Mutation APIs
- moveNode, moveSelectedNodes, setNodePosition - Position changes
- setNodeSize - Size changes
- setNodeVisibility, toggleNodeVisibility - Visibility changes
Selection APIs
- selectNode, selectNodes, clearNodeSelection - Selection management
- (Bulk selection methods are in GraphApi)
Z-Order APIs
- bringNodeToFront, sendNodeToBack - Extreme positioning
- bringNodeForward, sendNodeBackward - Incremental positioning
Layout APIs
- alignNodes - Alignment operations
- distributeNodesHorizontally, distributeNodesVertically - Distribution
- on
Properties
- nodeCount → int
-
Available on NodeFlowController<
Gets the total number of nodes in the graph.T> , provided by the NodeApi extensionno setter -
nodeIds
→ Iterable<
String> -
Available on NodeFlowController<
Gets all node IDs in the graph.T> , provided by the NodeApi extensionno setter
Methods
-
addInputPort(
String nodeId, Port port) → void -
Available on NodeFlowController<
Adds an input port to an existing node.T> , provided by the NodeApi extension -
addNode(
Node< T> node) → void -
Available on NodeFlowController<
Adds a new node to the graph.T> , provided by the NodeApi extension -
addOutputPort(
String nodeId, Port port) → void -
Available on NodeFlowController<
Adds an output port to an existing node.T> , provided by the NodeApi extension -
alignNodes(
List< String> nodeIds, NodeAlignment alignment) → void -
Available on NodeFlowController<
Aligns multiple nodes according to the specified alignment option.T> , provided by the NodeApi extension -
bringNodeForward(
String nodeId) → void -
Available on NodeFlowController<
Moves a node one step forward in the z-order.T> , provided by the NodeApi extension -
bringNodeToFront(
String nodeId) → void -
Available on NodeFlowController<
Brings a node to the front of the z-order (renders on top of all other nodes).T> , provided by the NodeApi extension -
clearNodeSelection(
) → void -
Available on NodeFlowController<
Clears all node selections.T> , provided by the NodeApi extension -
deleteNodes(
List< String> nodeIds) → void -
Available on NodeFlowController<
Deletes multiple nodes from the graph.T> , provided by the NodeApi extension -
distributeNodesHorizontally(
List< String> nodeIds) → void -
Available on NodeFlowController<
Distributes nodes evenly along the horizontal axis.T> , provided by the NodeApi extension -
distributeNodesVertically(
List< String> nodeIds) → void -
Available on NodeFlowController<
Distributes nodes evenly along the vertical axis.T> , provided by the NodeApi extension -
duplicateNode(
String nodeId) → void -
Available on NodeFlowController<
Creates a duplicate of a node and adds it to the graph.T> , provided by the NodeApi extension -
getHiddenNodes(
) → List< Node< T> > -
Available on NodeFlowController<
Gets all hidden nodes in the graph.T> , provided by the NodeApi extension -
getInputPorts(
String nodeId) → List< Port> -
Available on NodeFlowController<
Gets all input ports for a node.T> , provided by the NodeApi extension -
getNode(
String nodeId) → Node< T> ? -
Available on NodeFlowController<
Gets a node by its ID.T> , provided by the NodeApi extension -
getNodeBounds(
String nodeId) → Rect? -
Available on NodeFlowController<
Gets the bounding rectangle for a specific node.T> , provided by the NodeApi extension -
getNodesByType(
String type) → List< Node< T> > -
Available on NodeFlowController<
Gets all nodes of a specific type.T> , provided by the NodeApi extension -
getOutputPorts(
String nodeId) → List< Port> -
Available on NodeFlowController<
Gets all output ports for a node.T> , provided by the NodeApi extension -
getPort(
String nodeId, String portId) → Port? -
Available on NodeFlowController<
Gets a specific port from a node.T> , provided by the NodeApi extension -
getPortWorldPosition(
String nodeId, String portId) → Offset? -
Available on NodeFlowController<
Gets the world position of a port.T> , provided by the NodeApi extension -
getVisibleNodes(
) → List< Node< T> > -
Available on NodeFlowController<
Gets all visible nodes in the graph.T> , provided by the NodeApi extension -
hideAllNodes(
) → void -
Available on NodeFlowController<
Hides all nodes in the graph.T> , provided by the NodeApi extension -
hideSelectedNodes(
) → void -
Available on NodeFlowController<
Hides all currently selected nodes.T> , provided by the NodeApi extension -
isNodeSelected(
String nodeId) → bool -
Available on NodeFlowController<
Checks if a node is currently selected.T> , provided by the NodeApi extension -
moveNode(
String nodeId, Offset delta) → void -
Available on NodeFlowController<
Moves a node by the specified delta.T> , provided by the NodeApi extension -
moveSelectedNodes(
Offset delta) → void -
Available on NodeFlowController<
Moves all selected nodes by the specified delta.T> , provided by the NodeApi extension -
rebuildAllConnectionSegments(
) → void -
Available on NodeFlowController<
Rebuilds the entire connection spatial index using accurate path segments.T> , provided by the NodeApi extension -
rebuildConnectionSegmentsForNodes(
List< String> nodeIds) → void -
Available on NodeFlowController<
Rebuilds connection spatial index using accurate path segments. Call this after drag ends to restore accurate hit-testing.T> , provided by the NodeApi extension -
removeNode(
String nodeId) → void -
Available on NodeFlowController<
Removes a node from the graph along with all its connections.T> , provided by the NodeApi extension -
removePort(
String nodeId, String portId) → void -
Available on NodeFlowController<
Removes a port from a node and all connections involving that port.T> , provided by the NodeApi extension -
selectNode(
String nodeId, {bool toggle = false}) → void -
Available on NodeFlowController<
Selects a node in the graph.T> , provided by the NodeApi extension -
selectNodes(
List< String> nodeIds, {bool toggle = false}) → void -
Available on NodeFlowController<
Selects multiple nodes in the graph.T> , provided by the NodeApi extension -
sendNodeBackward(
String nodeId) → void -
Available on NodeFlowController<
Moves a node one step backward in the z-order.T> , provided by the NodeApi extension -
sendNodeToBack(
String nodeId) → void -
Available on NodeFlowController<
Sends a node to the back of the z-order (renders behind all other nodes).T> , provided by the NodeApi extension -
setNodePorts(
String nodeId, {List< Port> ? inputPorts, List<Port> ? outputPorts}) → void -
Available on NodeFlowController<
Sets the input and/or output ports of a node.T> , provided by the NodeApi extension -
setNodePosition(
String nodeId, Offset position) → void -
Available on NodeFlowController<
Sets a node's position to an absolute position.T> , provided by the NodeApi extension -
setNodeSize(
String nodeId, Size size) → void -
Available on NodeFlowController<
Sets the size of a node.T> , provided by the NodeApi extension -
setNodesVisibility(
List< String> nodeIds, bool visible) → void -
Available on NodeFlowController<
Sets visibility for multiple nodes at once.T> , provided by the NodeApi extension -
setNodeVisibility(
String nodeId, bool visible) → void -
Available on NodeFlowController<
Sets the visibility of a specific node.T> , provided by the NodeApi extension -
showAllNodes(
) → void -
Available on NodeFlowController<
Shows all nodes in the graph.T> , provided by the NodeApi extension -
showSelectedNodes(
) → void -
Available on NodeFlowController<
Shows all currently selected nodes.T> , provided by the NodeApi extension -
toggleNodeVisibility(
String nodeId) → bool? -
Available on NodeFlowController<
Toggles visibility of a specific node.T> , provided by the NodeApi extension