onPaint method
Draws segment in series bounds.
Implementation
@override
void onPaint(Canvas canvas) {
_setSegmentProperties();
final RangeAreaSeries<dynamic, dynamic> series =
_segmentProperties.series as RangeAreaSeries<dynamic, dynamic>;
_segmentProperties.pathRect = _segmentProperties.path.getBounds();
canvas.drawPath(_segmentProperties.path,
(series.gradient == null) ? fillPaint! : getFillPaint());
strokePaint = getStrokePaint();
if (strokePaint!.color != Colors.transparent) {
drawDashedLine(
canvas,
series.dashArray,
strokePaint!,
series.borderDrawMode == RangeAreaBorderMode.all
? _segmentProperties.path
: _segmentProperties.borderPath!);
}
}