draw method
Implementation of the parent class to draw the square
Implementation
@override
void draw(Canvas canvas, FlSpot spot, Offset offsetInCanvas) {
if (strokeWidth != 0.0 && strokeColor.opacity != 0.0) {
canvas.drawRect(
Rect.fromCircle(
center: offsetInCanvas,
radius: (size / 2) + (strokeWidth / 2),
),
Paint()
..color = strokeColor
..strokeWidth = strokeWidth
..style = PaintingStyle.stroke,
);
}
canvas.drawRect(
Rect.fromCircle(
center: offsetInCanvas,
radius: size / 2,
),
Paint()
..color = color
..style = PaintingStyle.fill,
);
}