TemporaryConnection constructor
TemporaryConnection({})
Creates a temporary connection for drag-and-drop operations.
Parameters:
startPoint: The position where the connection starts (source port position)sourceNodeId: ID of the node containing the source portsourcePortId: ID of the source portinitialCurrentPoint: Initial pointer position (typically same asstartPoint)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)
Implementation
TemporaryConnection({
required this.startPoint,
required this.sourceNodeId,
required this.sourcePortId,
required Offset initialCurrentPoint,
String? targetNodeId,
String? targetPortId,
}) : _currentPoint = Observable(initialCurrentPoint),
_targetNodeId = Observable(targetNodeId),
_targetPortId = Observable(targetPortId);