GraphApi<T, C> extension

Graph-level operations for NodeFlowController.

This extension provides methods for:

  • Loading and exporting complete graphs
  • Graph analysis and validation
  • Layout and arrangement operations
  • Batch selection operations
  • Theme and event configuration
  • Keyboard shortcuts
on

Properties

nodesBounds Rect

Available on NodeFlowController<T, C>, provided by the GraphApi extension

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

Methods

arrangeNodesHierarchically() → void

Available on NodeFlowController<T, C>, provided by the GraphApi extension

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

Available on NodeFlowController<T, C>, provided by the GraphApi extension

Arranges all nodes in a grid layout.
clearGraph() → void

Available on NodeFlowController<T, C>, provided by the GraphApi extension

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

Available on NodeFlowController<T, C>, provided by the GraphApi extension

Clears all selections (nodes and connections) and exits any active editing mode.
deleteSelectedWithConfirmation() Future<void>

Available on NodeFlowController<T, C>, provided by the GraphApi extension

Deletes all selected nodes and connections with lock check and confirmation.
detectCycles() List<List<String>>

Available on NodeFlowController<T, C>, provided by the GraphApi extension

Detects cycles in the graph using depth-first search.
exportGraph() NodeGraph<T, C>

Available on NodeFlowController<T, C>, provided by the GraphApi extension

Exports the current graph state including all nodes, connections, and viewport.
getConnectionsInBounds(Rect bounds, {String? excludeNodeId}) List<Connection<C>>

Available on NodeFlowController<T, C>, provided by the GraphApi extension

Gets all connections whose segment bounds intersect with the given bounds.
getFirstConnectionInBounds(Rect bounds, {String? excludeNodeId}) Connection<C>?

Available on NodeFlowController<T, C>, provided by the GraphApi extension

Finds the first connection whose segment bounds intersect with the given bounds.
getOrphanNodes() List<Node<T>>

Available on NodeFlowController<T, C>, provided by the GraphApi extension

Gets all nodes that have no connections.
hitTestConnections(Offset graphPosition) String?

Available on NodeFlowController<T, C>, provided by the GraphApi extension

Tests if a point hits any connection.
hitTestPort(Offset graphPosition) → ({bool isOutput, String nodeId, String portId})?

Available on NodeFlowController<T, C>, provided by the GraphApi extension

Hit test for a port at the given graph position.
invertSelection() → void

Available on NodeFlowController<T, C>, provided by the GraphApi extension

Inverts the current node selection.
loadGraph(NodeGraph<T, C> graph) → void

Available on NodeFlowController<T, C>, provided by the GraphApi extension

Loads a complete graph into the controller.
selectAllConnections() → void

Available on NodeFlowController<T, C>, provided by the GraphApi extension

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

Available on NodeFlowController<T, C>, provided by the GraphApi extension

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

Available on NodeFlowController<T, C>, provided by the GraphApi extension

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

Available on NodeFlowController<T, C>, provided by the GraphApi extension

Selects only the specified nodes, clearing any existing selection.