NodeFlowControllerAPI<T> extension

Factory methods and drag operations for NodeFlowController.

This extension provides methods for:

  • Factory methods for creating GroupNode and CommentNode
  • Widget-level drag operations for nodes and connections
  • Utility methods for group operations
on

Methods

cancelNodeDrag(Map<String, Offset> originalPositions) → void

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

Cancels a node drag operation and reverts to original positions.
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<T>, provided by the NodeFlowControllerAPI extension

Creates and adds a comment node to the graph.
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<T>, provided by the NodeFlowControllerAPI extension

Creates and adds a group node that visually groups multiple nodes.
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<T>, provided by the NodeFlowControllerAPI extension

Creates and adds a group node that surrounds the specified nodes.
endNodeDrag() → void

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

Ends a node drag operation.
findContainedNodes(GroupNode<T> group) Set<String>

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

Finds all nodes that are completely contained within a group's bounds.
hideAllAnnotationNodes() → void

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

Hides all group and comment nodes.
moveNodeDrag(Offset graphDelta) → void

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

Moves nodes during a drag operation.
showAllAnnotationNodes() → void

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

Shows all group and comment nodes.
startNodeDrag(String nodeId, {MouseCursor? cursor}) → void

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

Starts a node drag operation.