draw method
void
draw()
override
Implementation
@override
void draw(Canvas canvas, Size size, double scaleX, double scrollX,
double Function(double) getX, double Function(double) getY) {
if (xPosition == null) return;
final paint = Paint()
..color = color
..strokeWidth = strokeWidth
..style = PaintingStyle.stroke;
canvas.drawLine(
Offset(xPosition!, 0),
Offset(xPosition!, size.height),
paint,
);
}