onPaint method

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

Draw 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 (paint.color != Colors.transparent && paint.strokeWidth > 0) {
    canvas.drawPath(path, paint);
  }
}