TemporaryConnection constructor

TemporaryConnection({
  1. required Offset startPoint,
  2. required String startNodeId,
  3. required String startPortId,
  4. required bool isStartFromOutput,
  5. required Rect startNodeBounds,
  6. required Offset initialCurrentPoint,
  7. String? targetNodeId,
  8. String? targetPortId,
  9. Rect? targetNodeBounds,
})

Creates a temporary connection for drag-and-drop operations.

Parameters:

  • startPoint: The position where the drag started (port position)
  • startNodeId: ID of the node containing the starting port
  • startPortId: ID of the starting port
  • isStartFromOutput: Whether the drag started from an output port
  • startNodeBounds: Bounds of the starting node for node-aware routing
  • initialCurrentPoint: Initial pointer position (typically same as startPoint)
  • targetNodeId: Optional ID of the target node (set when hovering over a port)
  • targetPortId: Optional ID of the target port (set when hovering over a port)
  • targetNodeBounds: Optional bounds of the target node (set when hovering)

Implementation

TemporaryConnection({
  required this.startPoint,
  required this.startNodeId,
  required this.startPortId,
  required this.isStartFromOutput,
  required this.startNodeBounds,
  required Offset initialCurrentPoint,
  String? targetNodeId,
  String? targetPortId,
  Rect? targetNodeBounds,
}) : _currentPoint = Observable(initialCurrentPoint),
     _targetNodeId = Observable(targetNodeId),
     _targetPortId = Observable(targetPortId),
     _targetNodeBounds = Observable(targetNodeBounds);