Translate the polyline
Polyline translate({double x = 0, double y = 0}) { return Polyline(points.map((p) => p.translate(x, y)).toList()); }