pathToCoords static method
Implementation
static List<Offset> pathToCoords(Path path, [double pixelGap = 2]) {
var metrics = path.computeMetrics();
if (metrics.isEmpty) return [];
var coords = <Offset>[];
var metric = path.computeMetrics().first;
double position = 0;
while (position < metric.length) {
var tangent = metric.getTangentForOffset(position);
coords.add(tangent!.position);
position += pixelGap;
}
return coords;
}