getConnectionPoints method
Calculates connection points between two nodes.
Returns intersection points where links should connect to the nodes' shapes, based on their current geometry.
Implementation
@override
GraphConnectionPoints? getConnectionPoints(
GraphNode source,
GraphNode target,
Widget sourceWidget,
Widget targetWidget,
) {
final outgoing = _getLineIntersections(source, target);
final incoming = _getLineIntersections(target, source);
if (outgoing == null || incoming == null) {
return null;
}
return GraphConnectionPoints(outgoing: outgoing, incoming: incoming);
}