getBendPoints static method

List<Offset> getBendPoints({
  1. required Offset start,
  2. required Offset end,
  3. required PortPosition sourcePosition,
  4. required PortPosition targetPosition,
  5. double offset = 10.0,
})

Get the bend points (waypoints) for a smoothstep path without creating the Path These are the exact points where 90-degree bends occur

Implementation

static List<Offset> getBendPoints({
  required Offset start,
  required Offset end,
  required PortPosition sourcePosition,
  required PortPosition targetPosition,
  double offset = 10.0,
}) {
  return _calculateWaypoints(
    start.dx,
    start.dy,
    sourcePosition,
    end.dx,
    end.dy,
    targetPosition,
    offset,
  );
}