onPaint method

  1. @override
void onPaint(
  1. Canvas canvas
)
override

Draws segment in series bounds.

Implementation

@override
void onPaint(Canvas canvas) {
  Paint paint = getFillPaint();
  if (paint.color != Colors.transparent) {
    canvas.drawPath(path, paint);
  }

  paint = getStrokePaint();
  if (strokePaint.color != Colors.transparent &&
      strokePaint.strokeWidth > 0) {
    canvas.drawPath(path, paint);
  }
}