onPaint method
Draws segment in series bounds.
Implementation
@override
void onPaint(Canvas canvas) {
if (points.isEmpty || points.length != 3) {
return;
}
final Paint paint = getStrokePaint();
if (paint.color == Colors.transparent || paint.strokeWidth < 0) {
return;
}
final Offset start =
Offset.lerp(_oldPoints[0], points[0], animationFactor)!;
final Offset mid = Offset.lerp(_oldPoints[1], points[1], animationFactor)!;
final Offset end = Offset.lerp(_oldPoints[2], points[2], animationFactor)!;
drawDashes(canvas, series.dashArray, paint, start: start, end: mid);
drawDashes(canvas, series.dashArray, paint, start: mid, end: end);
}