render method
Implementation
@override
void render(Canvas canvas, Paint paint) {
if (points.isNotEmpty) {
paint.style = PaintingStyle.fill;
final path = Path()..moveTo(points.first.x, points.first.y);
for (var i = 1; i < points.length; i++) {
path.lineTo(points[i].x, points[i].y);
}
path.lineTo(points.first.x, points.first.y);
canvas.drawPath(path, paint);
}
}