GraphApi<T> 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>, 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>, provided by the GraphApi extension

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

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

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

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

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

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

Clears all selections (nodes, connections, and annotations).
detectCycles() List<List<String>>

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

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

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

Exports the current graph state including all nodes, connections, annotations, and viewport.
getOrphanNodes() List<Node<T>>

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

Gets all nodes that have no connections.
hitTestAnnotations(Offset graphPosition) Annotation?

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

Hit test annotations at a specific position.
hitTestConnections(Offset graphPosition) String?

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

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

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

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

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

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

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

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

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

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

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

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

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

Selects only the specified nodes, clearing any existing selection.
setEvents(NodeFlowEvents<T> events) → void

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

Update the events that the controller will use.
setTheme(NodeFlowTheme theme) → void

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

Set the theme and update the connection painter.
showShortcutsDialog(BuildContext context) → void

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

Shows the keyboard shortcuts dialog.