NodeFlowController<T, C> class
High-performance controller for node flow state management.
This is the main controller for managing nodes, connections, viewport, and interactions in a node flow editor. It uses MobX for reactive state management.
Type Parameters
T: The data type stored in each nodeC: The data type stored in each connection (defaults tovoidfor untyped connections)
Example
// Untyped connections (default)
final controller = NodeFlowController<MyNodeData>();
// Typed connections with a sealed class
sealed class EdgeData {}
class HighPriority extends EdgeData {}
class Normal extends EdgeData {}
final controller = NodeFlowController<MyNodeData, EdgeData>(
connections: [
Connection<EdgeData>(
id: 'conn-1',
sourceNodeId: 'a',
sourcePortId: 'out',
targetNodeId: 'b',
targetPortId: 'in',
data: HighPriority(),
),
],
);
Constructors
-
NodeFlowController({GraphViewport? initialViewport, NodeFlowConfig? config, List<
Node< ? nodes, List<T> >Connection< ? connections})C> > - Creates a new node flow controller.
Properties
-
activeConnectionIds
→ Set<
String> -
Gets IDs of connections involved in current interaction (package-private).
no setter
-
activeNodeIds
→ Set<
String> -
Gets IDs of nodes involved in current interaction (package-private).
When dragging a selected node, includes ALL selected nodes.
no setter
- autoPan → AutoPanExtension?
-
Available on NodeFlowController<
Gets the autopan extension, or null if not configured.T, dynamic> , provided by the AutoPanExtensionAccess extensionno setter - behavior → NodeFlowBehavior
-
The current behavior mode determining what interactions are allowed.
no setter
- canvasFocusNode → FocusNode
-
The focus node for the canvas.
no setter
-
canvasKey
→ GlobalKey<
State< StatefulWidget> > -
Key for the canvas widget, used to convert global coordinates to canvas-local.
final
- canvasLocked → bool
-
Checks if the canvas is locked (pan/zoom disabled) (package-private).
no setter
- config → NodeFlowConfig
-
Gets the controller's configuration settings.
no setter
- connectionCount → int
-
Available on NodeFlowController<
Gets the total number of connections in the graph.T, C> , provided by the ConnectionApi extensionno setter -
connectionIds
→ Iterable<
String> -
Available on NodeFlowController<
Gets all connection IDs in the graph.T, C> , provided by the ConnectionApi extensionno setter - connectionPainter → ConnectionPainter
-
Gets the connection painter used for rendering and hit-testing connections.
no setter
-
connections
→ List<
Connection< C> > -
Gets all connections in the graph.
no setter
-
connectionsObservable
→ ObservableList<
Connection< C> > -
Gets the connections observable list for reactive UI updates.
no setter
- currentPan → ScreenOffset
-
Available on NodeFlowController<
Gets the current pan position of the viewport.T, C> , provided by the ViewportApi extensionno setter - currentZoom → double
-
Available on NodeFlowController<
Gets the current zoom level of the viewport.T, C> , provided by the ViewportApi extensionno setter - debug → DebugExtension?
-
Available on NodeFlowController<
Gets the debug extension, or null if not configured.T, dynamic> , provided by the DebugExtensionAccess extensionno setter - draggedNodeId → String?
-
Gets the ID of the node currently being dragged, if any (package-private).
no setter
-
events
→ NodeFlowEvents<
T, C> -
Gets the current events configuration.
no setter
-
extensions
→ List<
NodeFlowExtension> -
Gets all registered extensions.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasSelection → bool
-
Checks if there is any active selection (nodes or connections).
no setter
- interaction → InteractionState
-
final
- isConnecting → bool
-
Checks if a connection is currently being created (package-private).
no setter
- isConnectionPainterInitialized → bool
-
Whether the connection painter has been initialized.
Use this to guard access to connectionPainter during initialization.
no setter
- isDrawingSelection → bool
-
Checks if a selection rectangle is being drawn (package-private).
no setter
- isEditorInitialized → bool
-
Available on NodeFlowController<
Whether the controller has been initialized for editor use.T, C> , provided by the EditorInitApi extensionno setter - isResizing → bool
-
Checks if any resize operation is in progress (package-private).
no setter
- lod → LodExtension?
-
Available on NodeFlowController<
Gets the Level of Detail (LOD) extension, or null if not configured.T, dynamic> , provided by the LodExtensionAccess extensionno setter - minimap → MinimapExtension?
-
Available on NodeFlowController<
Gets the minimap extension, or null if not configured.T, dynamic> , provided by the MinimapExtensionAccess extensionno setter - mousePositionWorld → GraphPosition?
-
Available on NodeFlowController<
Gets the current mouse position in graph coordinates.T, C> , provided by the ViewportApi extensionno setter - nodeCount → int
-
Available on NodeFlowController<
Gets the total number of nodes in the graph.T, C> , provided by the NodeApi extensionno setter -
nodeIds
→ Iterable<
String> -
Available on NodeFlowController<
Gets all node IDs in the graph.T, C> , provided by the NodeApi extensionno setter -
nodes
→ Map<
String, Node< T> > -
Gets all nodes in the graph as a map (package-private).
no setter
- nodesBounds → Rect
-
Available on NodeFlowController<
Gets the bounding rectangle that encompasses all nodes in the graph.T, C> , provided by the GraphApi extensionno setter -
nodeShapeBuilder
→ NodeShape? Function(Node<
T> node)? -
Gets the node shape builder function.
no setter
-
nodesObservable
→ ObservableMap<
String, Node< T> > -
Gets the nodes observable map for reactive UI updates.
no setter
- pointerPosition → ScreenPosition?
-
Gets the last known pointer position in screen/widget-local coordinates (package-private).
no setter
- resizingNodeId → String?
-
Gets the ID of the node currently being resized (package-private).
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- screenSize → Size
-
Gets the current screen/canvas size (package-private).
no setter
-
selectedConnectionIds
→ Set<
String> -
Gets the IDs of all currently selected connections (package-private).
no setter
-
selectedConnectionIdsObservable
→ ObservableSet<
String> -
Gets the selected connection IDs observable set for reactive UI updates.
no setter
-
selectedNodeIds
→ Set<
String> -
Gets the IDs of all currently selected nodes.
no setter
-
selectedNodeIdsObservable
→ ObservableSet<
String> -
Gets the selected node IDs observable set for reactive UI updates.
no setter
- selectedNodesBounds → GraphRect?
-
Available on NodeFlowController<
Gets the bounding rectangle that encompasses all selected nodes in graph coordinates.T, C> , provided by the ViewportApi extensionno setter - selectionRect → GraphRect?
-
Gets the current selection rectangle in graph coordinates (package-private).
no setter
- selectionStartPoint → GraphPosition?
-
Gets the starting point of the selection rectangle in graph coordinates (package-private).
no setter
-
shortcuts
↔ NodeFlowShortcutManager<
T> -
latefinal
-
sortedNodes
→ List<
Node< T> > -
Gets nodes sorted by z-index (package-private).
no setter
-
spatialIndex
→ GraphSpatialIndex<
T, C> -
Gets the hit tester for spatial queries (package-private).
no setter
- stats → StatsExtension?
-
Available on NodeFlowController<
Gets the stats extension, or null if not configured.T, dynamic> , provided by the StatsExtensionAccess extensionno setter - temporaryConnection → TemporaryConnection?
-
Gets the temporary connection being created, if any (package-private).
no setter
- theme → NodeFlowTheme?
-
Gets the current theme configuration.
no setter
- viewport → GraphViewport
-
Gets the current viewport state (position and zoom).
no setter
- viewportExtent → GraphRect
-
Available on NodeFlowController<
Gets the viewport extent as a GraphRect in graph coordinates.T, C> , provided by the ViewportApi extensionno setter -
viewportObservable
→ Observable<
GraphViewport> -
Gets the viewport observable for reactive UI updates.
no setter
- viewportScreenBounds → ScreenRect
-
Available on NodeFlowController<
Gets the viewport extent as a ScreenRect in global screen coordinates.T, C> , provided by the ViewportApi extensionno setter -
visibleConnections
→ List<
Connection< C> > -
Gets visible connections (package-private).
no setter
-
visibleNodes
→ List<
Node< T> > -
Gets visible nodes sorted by z-index (package-private).
no setter
Methods
-
addConnection(
Connection< C> connection) → void -
Available on NodeFlowController<
Adds a connection between two ports.T, C> , provided by the ConnectionApi extension -
addExtension(
NodeFlowExtension extension) → void - Registers an extension with this controller.
-
addInputPort(
String nodeId, Port port) → void -
Available on NodeFlowController<
Adds an input port to an existing node.T, C> , provided by the NodeApi extension -
addNode(
Node< T> node) → void -
Available on NodeFlowController<
Adds a new node to the graph.T, C> , provided by the NodeApi extension -
addOutputPort(
String nodeId, Port port) → void -
Available on NodeFlowController<
Adds an output port to an existing node.T, C> , 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, C> , provided by the NodeApi extension -
animateToBounds(
GraphRect bounds, {double padding = 50.0, Duration duration = const Duration(milliseconds: 400), Curve curve = Curves.easeInOut}) → void -
Available on NodeFlowController<
Animates the viewport to fit a bounding rectangle with padding.T, C> , provided by the ViewportApi extension -
animateToNode(
String nodeId, {double? zoom = 1.0, Duration duration = const Duration(milliseconds: 400), Curve curve = Curves.easeInOut}) → void -
Available on NodeFlowController<
Animates the viewport to center on a specific node.T, C> , provided by the ViewportApi extension -
animateToNodes(
List< String> nodeIds, {double padding = 60.0, Duration duration = const Duration(milliseconds: 400), Curve curve = Curves.easeInOut}) → void -
Available on NodeFlowController<
Animates the viewport to show all specified nodes.T, C> , provided by the ViewportApi extension -
animateToPosition(
GraphOffset position, {double? zoom, Duration duration = const Duration(milliseconds: 400), Curve curve = Curves.easeInOut}) → void -
Available on NodeFlowController<
Animates the viewport to center on a specific position in graph coordinates.T, C> , provided by the ViewportApi extension -
animateToScale(
double scale, {Duration duration = const Duration(milliseconds: 400), Curve curve = Curves.easeInOut}) → void -
Available on NodeFlowController<
Animates the viewport to a specific zoom level, keeping the center fixed.T, C> , provided by the ViewportApi extension -
animateToViewport(
GraphViewport target, {Duration duration = const Duration(milliseconds: 400), Curve curve = Curves.easeInOut}) → void -
Available on NodeFlowController<
Animates the viewport to a target state.T, C> , provided by the ViewportApi extension -
arrangeNodesHierarchically(
) → void -
Available on NodeFlowController<
Arranges nodes hierarchically by type.T, C> , provided by the GraphApi extension -
arrangeNodesInGrid(
{double spacing = 150.0}) → void -
Available on NodeFlowController<
Arranges all nodes in a grid layout.T, C> , provided by the GraphApi extension -
batch(
String reason, void operations()) → void - Wraps multiple operations in a batch.
-
bringNodeForward(
String nodeId) → void -
Available on NodeFlowController<
Moves a node one step forward in the z-order.T, C> , 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, C> , provided by the NodeApi extension -
cancelConnectionDrag(
) → void -
Available on NodeFlowController<
Cancels a connection drag without creating a connection.T, C> , provided by the ConnectionApi extension -
cancelNodeDrag(
Map< String, Offset> originalPositions) → void -
Available on NodeFlowController<
Cancels a node drag operation and reverts to original positions.T, C> , provided by the NodeFlowControllerAPI extension -
cancelResize(
) → void -
Available on NodeFlowController<
Cancels a resize operation and reverts to original position/size.T, C> , provided by the ResizeApi extension -
canConnect(
{required String targetNodeId, required String targetPortId, bool skipCustomValidation = false}) → ConnectionValidationResult -
Available on NodeFlowController<
Validates whether a connection can be made from the current drag state to the specified target port.T, C> , provided by the ConnectionApi extension -
canStartConnection(
{required String nodeId, required String portId, required bool isOutput}) → ConnectionValidationResult -
Available on NodeFlowController<
Validates whether a connection can start from the specified port.T, C> , provided by the ConnectionApi extension -
centerOn(
GraphOffset point) → void -
Available on NodeFlowController<
Centers the viewport on a specific point in graph coordinates without changing zoom.T, C> , provided by the ViewportApi extension -
centerOnNode(
String nodeId) → void -
Available on NodeFlowController<
Centers the viewport on a specific node without changing the zoom level.T, C> , provided by the ViewportApi extension -
centerOnNodeWithZoom(
String nodeId, {double zoom = 1.0}) → void -
Available on NodeFlowController<
Centers the viewport on a node and sets zoom level in one operation.T, C> , provided by the ViewportApi extension -
centerOnSelection(
) → void -
Available on NodeFlowController<
Centers the viewport on the center point of all selected nodes without changing zoom.T, C> , provided by the ViewportApi extension -
centerViewport(
) → void -
Available on NodeFlowController<
Centers the viewport on the geometric center of all nodes without changing zoom.T, C> , provided by the ViewportApi extension -
clearAnimateToHandler(
Object token) → void -
Available on NodeFlowController<
Clears the animation handler only if it was set by the same token.T, C> , provided by the ViewportApi extension -
clearConnectionSelection(
) → void -
Available on NodeFlowController<
Clears all connection selections.T, C> , provided by the ConnectionApi extension -
clearGraph(
) → void -
Available on NodeFlowController<
Clears the entire graph, removing all nodes, connections, and selections.T, C> , provided by the GraphApi extension -
clearNodeSelection(
) → void -
Available on NodeFlowController<
Clears all node selections.T, C> , provided by the NodeApi extension -
clearSelection(
) → void -
Available on NodeFlowController<
Clears all selections (nodes and connections) and exits any active editing mode.T, C> , provided by the GraphApi extension -
completeConnectionDrag(
{required String targetNodeId, required String targetPortId}) → Connection< C> ? -
Available on NodeFlowController<
Completes a connection drag by creating the connection.T, C> , provided by the ConnectionApi extension -
createCommentNode(
{required Offset position, required String text, required T data, String? id, double width = 200.0, double height = 100.0, Color color = const Color(0xFFFFF59D)}) → CommentNode< T> -
Available on NodeFlowController<
Creates and adds a comment node to the graph.T, C> , provided by the NodeFlowControllerAPI extension -
createConnection(
String sourceNodeId, String sourcePortId, String targetNodeId, String targetPortId) → void -
Available on NodeFlowController<
Creates a connection between two ports.T, C> , provided by the ConnectionApi extension -
createGroupNode(
{required String title, required Offset position, required Size size, required T data, String? id, Color color = const Color(0xFF2196F3), GroupBehavior behavior = GroupBehavior.bounds, Set< String> ? nodeIds, EdgeInsets padding = kGroupNodeDefaultPadding, List<Port> inputPorts = const [], List<Port> outputPorts = const []}) → GroupNode<T> -
Available on NodeFlowController<
Creates and adds a group node that visually groups multiple nodes.T, C> , provided by the NodeFlowControllerAPI extension -
createGroupNodeAroundNodes(
{required String title, required Set< String> nodeIds, required T data, String? id, EdgeInsets padding = const EdgeInsets.all(20.0), Color color = const Color(0xFF2196F3), GroupBehavior behavior = GroupBehavior.bounds, List<Port> inputPorts = const [], List<Port> outputPorts = const []}) → GroupNode<T> -
Available on NodeFlowController<
Creates and adds a group node that surrounds the specified nodes.T, C> , provided by the NodeFlowControllerAPI extension -
createSession(
DragSessionType type) → DragSession - Creates a drag session for managing drag operation lifecycle.
-
deleteAllConnectionsForNode(
String nodeId) → void -
Available on NodeFlowController<
Deletes all connections associated with a node.T, C> , provided by the ConnectionApi extension -
deleteNodes(
List< String> nodeIds) → void -
Available on NodeFlowController<
Deletes multiple nodes from the graph.T, C> , provided by the NodeApi extension -
deleteSelectedWithConfirmation(
) → Future< void> -
Available on NodeFlowController<
Deletes all selected nodes and connections with lock check and confirmation.T, C> , provided by the GraphApi extension -
detectCycles(
) → List< List< String> > -
Available on NodeFlowController<
Detects cycles in the graph using depth-first search.T, C> , provided by the GraphApi extension -
dispose(
) → void - Disposes of the controller and releases resources.
-
distributeNodesHorizontally(
List< String> nodeIds) → void -
Available on NodeFlowController<
Distributes nodes evenly along the horizontal axis.T, C> , provided by the NodeApi extension -
distributeNodesVertically(
List< String> nodeIds) → void -
Available on NodeFlowController<
Distributes nodes evenly along the vertical axis.T, C> , 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, C> , provided by the NodeApi extension -
endNodeDrag(
) → void -
Available on NodeFlowController<
Ends a node drag operation.T, C> , provided by the NodeFlowControllerAPI extension -
endResize(
) → void -
Available on NodeFlowController<
Ends the current resize operation.T, C> , provided by the ResizeApi extension -
exportGraph(
) → NodeGraph< T, C> -
Available on NodeFlowController<
Exports the current graph state including all nodes, connections, and viewport.T, C> , provided by the GraphApi extension -
findContainedNodes(
GroupNode< T> group) → Set<String> -
Available on NodeFlowController<
Finds all nodes that are completely contained within a group's bounds.T, C> , provided by the NodeFlowControllerAPI extension -
fitSelectedNodes(
) → void -
Available on NodeFlowController<
Adjusts the viewport to fit all selected nodes in the view with padding.T, C> , provided by the ViewportApi extension -
fitToView(
) → void -
Available on NodeFlowController<
Adjusts the viewport to fit all nodes in the view with padding.T, C> , provided by the ViewportApi extension -
flushPendingSpatialUpdates(
) → void -
Available on NodeFlowController<
Flushes all pending spatial index updates synchronously.T, C> , provided by the DirtyTrackingExtension extension -
getConnection(
String connectionId) → Connection< C> ? -
Available on NodeFlowController<
Gets a connection by its ID.T, C> , provided by the ConnectionApi extension -
getConnectionBounds(
String connectionId) → Rect? -
Available on NodeFlowController<
Gets the bounding rectangle for a connection.T, C> , provided by the ConnectionApi extension -
getConnectionPath(
String connectionId) → Path? -
Available on NodeFlowController<
Gets the rendered path for a connection.T, C> , provided by the ConnectionApi extension -
getConnectionsForNode(
String nodeId) → List< Connection< C> > -
Available on NodeFlowController<
Gets all connections associated with a node.T, C> , provided by the ConnectionApi extension -
getConnectionsFromPort(
String nodeId, String portId) → List< Connection< C> > -
Available on NodeFlowController<
Gets all connections originating from a specific port.T, C> , provided by the ConnectionApi extension -
getConnectionsToPort(
String nodeId, String portId) → List< Connection< C> > -
Available on NodeFlowController<
Gets all connections targeting a specific port.T, C> , provided by the ConnectionApi extension -
getCycles(
) → List< List< String> > -
Available on NodeFlowController<
Gets all cycles in the graph.T, C> , provided by the ConnectionApi extension -
getExtension<
E extends NodeFlowExtension> () → E? - Gets an extension by its type.
-
getHiddenConnections(
) → List< Connection< C> > -
Available on NodeFlowController<
Gets all hidden connections in the graph.T, C> , provided by the ConnectionApi extension -
getHiddenNodes(
) → List< Node< T> > -
Available on NodeFlowController<
Gets all hidden nodes in the graph.T, C> , provided by the NodeApi extension -
getInputPorts(
String nodeId) → List< Port> -
Available on NodeFlowController<
Gets all input ports for a node.T, C> , provided by the NodeApi extension -
getNode(
String nodeId) → Node< T> ? -
Available on NodeFlowController<
Gets a node by its ID.T, C> , provided by the NodeApi extension -
getNodeBounds(
String nodeId) → Rect? -
Available on NodeFlowController<
Gets the bounding rectangle for a specific node.T, C> , provided by the NodeApi extension -
getNodesByType(
String type) → List< Node< T> > -
Available on NodeFlowController<
Gets all nodes of a specific type.T, C> , provided by the NodeApi extension -
getOrphanNodes(
) → List< Node< T> > -
Available on NodeFlowController<
Gets all nodes that have no connections.T, C> , provided by the GraphApi extension -
getOutputPorts(
String nodeId) → List< Port> -
Available on NodeFlowController<
Gets all output ports for a node.T, C> , provided by the NodeApi extension -
getPort(
String nodeId, String portId) → Port? -
Available on NodeFlowController<
Gets a specific port from a node.T, C> , provided by the NodeApi extension -
getPortWorldPosition(
String nodeId, String portId) → Offset? -
Available on NodeFlowController<
Gets the world position of a port.T, C> , provided by the NodeApi extension -
getViewportCenter(
) → GraphPosition -
Available on NodeFlowController<
Gets the center point of the current viewport in graph coordinates.T, C> , provided by the ViewportApi extension -
getVisibleConnections(
) → List< Connection< C> > -
Available on NodeFlowController<
Gets all visible connections in the graph.T, C> , provided by the ConnectionApi extension -
getVisibleNodes(
) → List< Node< T> > -
Available on NodeFlowController<
Gets all visible nodes in the graph.T, C> , provided by the NodeApi extension -
globalToGraph(
ScreenPosition globalPosition) → GraphPosition -
Available on NodeFlowController<
Converts a global screen position to graph coordinates.T, C> , provided by the ViewportApi extension -
graphToScreen(
GraphPosition graphPoint) → ScreenPosition -
Available on NodeFlowController<
Converts a graph coordinate point to screen coordinates.T, C> , provided by the ViewportApi extension -
hasCycles(
) → bool -
Available on NodeFlowController<
Checks if the graph contains any cycles.T, C> , provided by the ConnectionApi extension -
hasExtension(
String id) → bool - Checks if an extension with the given ID is registered.
-
hideAllGroupAndCommentNodes(
) → void -
Available on NodeFlowController<
Hides all GroupNode and CommentNode instances.T, C> , provided by the NodeFlowControllerAPI extension -
hideAllNodes(
) → void -
Available on NodeFlowController<
Hides all nodes in the graph.T, C> , provided by the NodeApi extension -
hideSelectedNodes(
) → void -
Available on NodeFlowController<
Hides all currently selected nodes.T, C> , provided by the NodeApi extension -
hitTestConnections(
Offset graphPosition) → String? -
Available on NodeFlowController<
Tests if a point hits any connection.T, C> , provided by the GraphApi extension -
hitTestPort(
Offset graphPosition) → ({bool isOutput, String nodeId, String portId})? -
Available on NodeFlowController<
Hit test for a port at the given graph position.T, C> , provided by the GraphApi extension -
initController(
{required NodeFlowTheme theme, required Size portSizeResolver(Port port), NodeShape? nodeShapeBuilder(Node< T> node)?, bool Function(Connection connection, Offset point)? connectionHitTesterBuilder(ConnectionPainter painter)?, List<Rect> connectionSegmentCalculator(Connection connection)?, NodeFlowEvents<T, C> ? events}) → void -
Available on NodeFlowController<
Initializes the controller for use with the NodeFlow editor.T, C> , provided by the EditorInitApi extension -
invertSelection(
) → void -
Available on NodeFlowController<
Inverts the current node selection.T, C> , provided by the GraphApi extension -
isConnectionSelected(
String connectionId) → bool -
Available on NodeFlowController<
Checks if a connection is currently selected.T, C> , provided by the ConnectionApi extension -
isNodeSelected(
String nodeId) → bool -
Available on NodeFlowController<
Checks if a node is currently selected.T, C> , provided by the NodeApi extension -
isPointVisible(
GraphPosition graphPoint) → bool -
Available on NodeFlowController<
Checks if a graph coordinate point is visible in the current viewport.T, C> , provided by the ViewportApi extension -
isRectVisible(
GraphRect graphRect) → bool -
Available on NodeFlowController<
Checks if a graph coordinate rectangle intersects with the viewport.T, C> , provided by the ViewportApi extension -
loadGraph(
NodeGraph< T, C> graph) → void -
Available on NodeFlowController<
Loads a complete graph into the controller.T, C> , provided by the GraphApi extension -
moveNode(
String nodeId, Offset delta) → void -
Available on NodeFlowController<
Moves a node by the specified delta.T, C> , provided by the NodeApi extension -
moveNodeDrag(
Offset graphDelta) → void -
Available on NodeFlowController<
Moves nodes during a drag operation.T, C> , provided by the NodeFlowControllerAPI extension -
moveSelectedNodes(
Offset delta) → void -
Available on NodeFlowController<
Moves all selected nodes by the specified delta.T, C> , provided by the NodeApi extension -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
panBy(
ScreenOffset delta) → void -
Available on NodeFlowController<
Pans the viewport by a delta offset.T, C> , provided by the ViewportApi extension -
panToPosition(
Offset graphPosition) → void -
Available on NodeFlowController<
Pans the viewport to center on the specified graph position.T, dynamic> , provided by the MinimapControllerExtension extension -
rebuildAllConnectionSegments(
) → void -
Available on NodeFlowController<
Rebuilds the entire connection spatial index using accurate path segments.T, C> , 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, C> , provided by the NodeApi extension -
removeConnection(
String connectionId) → void -
Available on NodeFlowController<
Removes a connection from the graph.T, C> , provided by the ConnectionApi extension -
removeExtension(
String id) → void - Removes an extension by its ID.
-
removeNode(
String nodeId) → void -
Available on NodeFlowController<
Removes a node from the graph along with all its connections.T, C> , 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, C> , provided by the NodeApi extension -
requestDeleteConnection(
String connectionId) → Future< bool> -
Available on NodeFlowController<
Requests deletion of a connection with lock check and confirmation callback.T, C> , provided by the ConnectionApi extension -
requestDeleteNode(
String nodeId) → Future< bool> -
Available on NodeFlowController<
Requests deletion of a node with lock check and confirmation callback.T, C> , provided by the NodeApi extension -
resetViewport(
) → void -
Available on NodeFlowController<
Resets the viewport to zoom 1.0 and centers on all nodes in the graph.T, C> , provided by the ViewportApi extension -
resolveExtension<
E extends NodeFlowExtension> () → E? - Resolves an extension by type.
-
screenToGraph(
ScreenPosition screenPoint) → GraphPosition -
Available on NodeFlowController<
Converts a screen coordinate point to graph coordinates.T, C> , provided by the ViewportApi extension -
selectAllConnections(
) → void -
Available on NodeFlowController<
Selects all connections in the graph.T, C> , provided by the GraphApi extension -
selectAllConnections(
) → void -
Available on NodeFlowController<
Selects all connections in the graph.T, C> , provided by the ConnectionApi extension -
selectAllNodes(
) → void -
Available on NodeFlowController<
Selects all selectable nodes in the graph.T, C> , provided by the GraphApi extension -
selectConnection(
String connectionId, {bool toggle = false}) → void -
Available on NodeFlowController<
Selects a connection in the graph.T, C> , provided by the ConnectionApi extension -
selectNode(
String nodeId, {bool toggle = false}) → void -
Available on NodeFlowController<
Selects a node in the graph.T, C> , provided by the NodeApi extension -
selectNodes(
List< String> nodeIds, {bool toggle = false}) → void -
Available on NodeFlowController<
Selects multiple nodes in the graph.T, C> , provided by the NodeApi extension -
selectNodesByType(
String type) → void -
Available on NodeFlowController<
Selects all nodes of a specific type.T, C> , provided by the GraphApi extension -
selectSpecificNodes(
List< String> nodeIds) → void -
Available on NodeFlowController<
Selects only the specified nodes, clearing any existing selection.T, C> , provided by the GraphApi extension -
sendNodeBackward(
String nodeId) → void -
Available on NodeFlowController<
Moves a node one step backward in the z-order.T, C> , 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, C> , provided by the NodeApi extension -
setAnimateToHandler(
void handler(GraphViewport target, {Curve curve, Duration duration})?, {Object? token}) → void -
Available on NodeFlowController<
Sets the handler for viewport animations.T, C> , provided by the ViewportApi extension -
setBehavior(
NodeFlowBehavior value) → void - Sets the behavior mode for the canvas.
-
setMousePositionWorld(
GraphPosition? position) → void -
Available on NodeFlowController<
Updates the mouse position in graph coordinates.T, C> , provided by the ViewportApi 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, C> , provided by the NodeApi extension -
setNodePosition(
String nodeId, Offset position) → void -
Available on NodeFlowController<
Sets a node's position to an absolute position.T, C> , provided by the NodeApi extension -
setNodeShapeBuilder(
NodeShape? builder(Node< T> node)?) → void - Sets the node shape builder function.
-
setNodeSize(
String nodeId, Size size) → void -
Available on NodeFlowController<
Sets the size of a node.T, C> , provided by the NodeApi extension -
setNodesVisibility(
List< String> nodeIds, bool visible) → void -
Available on NodeFlowController<
Sets visibility for multiple nodes at once.T, C> , provided by the NodeApi extension -
setNodeVisibility(
String nodeId, bool visible) → void -
Available on NodeFlowController<
Sets the visibility of a specific node.T, C> , provided by the NodeApi extension -
setScreenSize(
Size size) → void -
Available on NodeFlowController<
Sets the screen size used for viewport calculations.T, C> , provided by the ViewportApi extension -
setViewport(
GraphViewport viewport) → void -
Available on NodeFlowController<
Sets the viewport to a specific position and zoom level.T, C> , provided by the ViewportApi extension -
showAllGroupAndCommentNodes(
) → void -
Available on NodeFlowController<
Shows all GroupNode and CommentNode instances.T, C> , provided by the NodeFlowControllerAPI extension -
showAllNodes(
) → void -
Available on NodeFlowController<
Shows all nodes in the graph.T, C> , provided by the NodeApi extension -
showSelectedNodes(
) → void -
Available on NodeFlowController<
Shows all currently selected nodes.T, C> , provided by the NodeApi extension -
startConnectionDrag(
{required String nodeId, required String portId, required bool isOutput, required Offset startPoint, required Rect nodeBounds, Offset? initialScreenPosition}) → ConnectionValidationResult -
Available on NodeFlowController<
Starts a connection drag from a port.T, C> , provided by the ConnectionApi extension -
startNodeDrag(
String nodeId, {MouseCursor? cursor}) → void -
Available on NodeFlowController<
Starts a node drag operation.T, C> , provided by the NodeFlowControllerAPI extension -
startResize(
String nodeId, ResizeHandle handle, Offset globalPosition) → void -
Available on NodeFlowController<
Starts a resize operation for any resizable node.T, C> , provided by the ResizeApi extension -
toggleNodeVisibility(
String nodeId) → bool? -
Available on NodeFlowController<
Toggles visibility of a specific node.T, C> , provided by the NodeApi extension -
toString(
) → String -
A string representation of this object.
inherited
-
updateConnectionDrag(
{required Offset graphPosition, String? targetNodeId, String? targetPortId, Rect? targetNodeBounds}) → void -
Available on NodeFlowController<
Updates a connection drag with the current position.T, C> , provided by the ConnectionApi extension -
updateEvents(
NodeFlowEvents< T, C> events) → void -
Available on NodeFlowController<
Updates the event handlers on an already-initialized controller.T, C> , provided by the EditorInitApi extension -
updateNodeShapeBuilder(
NodeShape? builder(Node< T> node)?) → void -
Available on NodeFlowController<
Updates the node shape builder on an already-initialized controller.T, C> , provided by the EditorInitApi extension -
updateResize(
Offset globalPosition) → void -
Available on NodeFlowController<
Updates the size of the currently resizing node during a resize operation.T, C> , provided by the ResizeApi extension -
updateTheme(
NodeFlowTheme theme) → void -
Available on NodeFlowController<
Updates the theme on an already-initialized controller.T, C> , provided by the EditorInitApi extension -
zoomBy(
double delta) → void -
Available on NodeFlowController<
Zoom the viewport by a delta value while maintaining the viewport center as the focal point.T, C> , provided by the ViewportApi extension -
zoomTo(
double zoom) → void -
Available on NodeFlowController<
Sets the viewport zoom to a specific value.T, C> , provided by the ViewportApi extension
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited