parsePointList function
Parses a semicolon-separated list of "x,y" coordinate pairs into a list of (double, double) tuples, or returns null if malformed or fewer than 2 points are present.
Used by CLI adapters that accept multi-point path flags like --points.
Implementation
List<(double, double)>? parsePointList(String raw) {
final points = <(double, double)>[];
for (final part in raw.split(';')) {
final xy = parseXY(part);
if (xy == null) return null;
points.add(xy);
}
return points.length >= 2 ? points : null;
}