onPaint method

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

Draws segment in series bounds.

Implementation

@override
void onPaint(Canvas canvas) {
  _setSegmentProperties();
  _segmentProperties.pathRect = _segmentProperties.path.getBounds();
  canvas.drawPath(
      _segmentProperties.path,
      (_segmentProperties.series.gradient == null)
          ? fillPaint!
          : getFillPaint());
  drawDashedLine(canvas, _segmentProperties.series.dashArray, strokePaint!,
      _segmentProperties.strokePath!);
}