NodeFlowControllerAPI<T> extension

on

Properties

currentPan Offset

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

Gets the current pan position of the viewport.
no setter
currentZoom double

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

Gets the current zoom level of the viewport.
no setter
nodesBounds Rect

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

Gets the bounding rectangle that encompasses all nodes in the graph.
no setter
selectedNodesBounds Rect?

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

Gets the bounding rectangle that encompasses all selected nodes in world coordinates.
no setter
viewportExtent Rect

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

Gets the viewport extent as a Rect in world coordinates.
no setter
viewportScreenBounds Rect

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

Gets the viewport extent as a Rect in screen coordinates.
no setter

Methods

addAnnotation(Annotation annotation) → void

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

Adds an annotation to the graph.
addConnection(Connection connection) → void

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

Adds a connection between two ports.
addInputPort(String nodeId, Port port) → void

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

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

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

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

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

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

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

Aligns multiple nodes according to the specified alignment option.
arrangeNodesHierarchically() → void

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

Arranges nodes hierarchically by type.
arrangeNodesInGrid({double spacing = 150.0}) → void

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

Arranges all nodes in a grid layout.
bringNodeForward(String nodeId) → void

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

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

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

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

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

Centers the viewport on a specific node without changing the zoom level.
centerOnSelection() → void

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

Centers the viewport on the center point of all selected nodes without changing zoom.
clearAnnotationSelection() → void

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

Clears all annotation selections.
clearConnectionSelection() → void

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

Clears all connection selections.
clearGraph() → void

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

Clears the entire graph, removing all nodes, connections, annotations, and selections.
clearNodeSelection() → void

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

Clears all node selections.
clearSelection() → void

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

Clears all selections (nodes, connections, and annotations).
createConnection(String sourceNodeId, String sourcePortId, String targetNodeId, String targetPortId) → void

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

Creates a connection between two ports.
createGroupAnnotation({required String title, required Set<String> nodeIds, String? id, EdgeInsets padding = const EdgeInsets.all(20.0), Color color = const Color(0xFF2196F3)}) GroupAnnotation

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

Creates and adds a group annotation that visually groups multiple nodes.
createMarker({required Offset position, MarkerType markerType = MarkerType.info, String? id, double size = 24.0, Color color = const Color(0xFFF44336), String? tooltip, Offset offset = Offset.zero}) MarkerAnnotation

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

Creates and adds a marker annotation to the graph.
createStickyNote({required Offset position, required String text, String? id, double width = 200.0, double height = 100.0, Color color = const Color(0xFFFFF59D), Offset offset = Offset.zero}) StickyAnnotation

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

Creates and adds a sticky note annotation to the graph.
deleteAllConnectionsForNode(String nodeId) → void

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

Deletes all connections associated with a node.
deleteNodes(List<String> nodeIds) → void

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

Deletes multiple nodes from the graph.
deleteSelectedAnnotations() → void

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

Deletes all currently selected annotations.
detectCycles() List<List<String>>

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

Detects cycles in the graph using depth-first search.
distributeNodesHorizontally(List<String> nodeIds) → void

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

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

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

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

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

Creates a duplicate of a node and adds it to the graph.
exportGraph() NodeGraph<T>

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

Exports the current graph state including all nodes, connections, annotations, and viewport.
fitSelectedNodes() → void

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

Adjusts the viewport to fit all selected nodes in the view with padding.
fitToView() → void

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

Adjusts the viewport to fit all nodes in the view with padding.
getAnnotation(String annotationId) Annotation?

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

Gets an annotation by its ID.
getConnectionsForNode(String nodeId) List<Connection>

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

Gets all connections associated with a node.
getNode(String nodeId) Node<T>?

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

Gets a node by its ID.
getOrphanNodes() List<Node<T>>

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

Gets all nodes that have no connections.
hideAllAnnotations() → void

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

Hides all annotations in the graph.
hitTestAnnotations(Offset graphPosition) Annotation?

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

Hit test annotations at a specific position This is a delegating method for the editor's hit testing
hitTestConnections(Offset graphPosition) String?

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

Tests if a point hits any connection.
invertSelection() → void

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

Inverts the current node selection.
isAnnotationSelected(String annotationId) bool

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

Checks if an annotation is currently selected.
isNodeSelected(String nodeId) bool

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

Checks if a node is currently selected.
isPointVisible(Offset worldPoint) bool

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

Checks if a world coordinate point is visible in the current viewport.
isRectVisible(Rect worldRect) bool

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

Checks if a world coordinate rectangle intersects with the viewport.
loadGraph(NodeGraph<T> graph) → void

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

Loads a complete graph into the controller.
moveNode(String nodeId, Offset delta) → void

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

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

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

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

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

Pans the viewport by a delta offset.
removeAnnotation(String annotationId) → void

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

Removes an annotation from the graph.
removeConnection(String connectionId) → void

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

Removes a connection from the graph.
removeNode(String nodeId) → void

Available on NodeFlowController<T>, provided by the NodeFlowControllerAPI 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 NodeFlowControllerAPI extension

Removes a port from a node and all connections involving that port.
resetViewport() → void

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

Resets the viewport to zoom 1.0 and centers on all nodes in the graph.
screenToWorld(Offset screenPoint) Offset

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

Converts a screen coordinate point to world coordinates.
selectAllConnections() → void

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

Selects all connections in the graph.
selectAllNodes() → void

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

Selects all nodes in the graph.
selectAnnotation(String annotationId, {bool toggle = false}) → void

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

Selects an annotation in the graph.
selectConnection(String connectionId, {bool toggle = false}) → void

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

Selects a connection in the graph.
selectNode(String nodeId, {bool toggle = false}) → void

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

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

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

Selects multiple nodes in the graph.
selectNodesByType(String type) → void

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

Selects all nodes of a specific type.
selectSpecificNodes(List<String> nodeIds) → void

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

Selects only the specified nodes, clearing any existing selection.
sendNodeBackward(String nodeId) → void

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

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

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

Sends a node to the back of the z-order (renders behind all other nodes).
setCallbacks(NodeFlowCallbacks<T> callbacks) → void

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

Update the callbacks that the controller will use This is called internally by the editor widget only
setNodePorts(String nodeId, {List<Port>? inputPorts, List<Port>? outputPorts}) → void

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

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

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

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

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

Sets the size of a node.
setScreenSize(Size size) → void

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

Sets the screen size used for viewport calculations.
setTheme(NodeFlowTheme theme) → void

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

Set the theme and update the connection painter This is called internally by the editor widget only
setViewport(GraphViewport viewport) → void

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

Sets the viewport to a specific position and zoom level.
showAllAnnotations() → void

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

Shows all annotations in the graph.
showShortcutsDialog(BuildContext context) → void

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

Shows the keyboard shortcuts dialog.
worldToScreen(Offset worldPoint) Offset

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

Converts a world coordinate point to screen coordinates.
zoomBy(double delta) → void

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

Zoom the viewport by a delta value while maintaining the viewport center as the focal point.
zoomTo(double zoom) → void

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

Sets the viewport zoom to a specific value.