getStrokePaint method
Gets the stroke color of the series.
Implementation
@override
Paint getStrokePaint() {
final SegmentProperties segmentProperties =
SegmentHelper.getSegmentProperties(this);
final Paint strokePaint = Paint();
assert(segmentProperties.series.opacity >= 0 == true,
'The opacity value of the stacked line100 series should be greater than or equal to 0.');
assert(segmentProperties.series.opacity <= 1 == true,
'The opacity value of the stacked line100 series should be less than or equal to 1.');
if (segmentProperties.strokeColor != null) {
strokePaint.color =
segmentProperties.pointColorMapper ?? segmentProperties.strokeColor!;
strokePaint.color = (segmentProperties.series.opacity < 1 == true &&
strokePaint.color != Colors.transparent)
? strokePaint.color.withOpacity(segmentProperties.series.opacity)
: strokePaint.color;
}
strokePaint.strokeWidth = segmentProperties.strokeWidth!;
strokePaint.style = PaintingStyle.stroke;
strokePaint.strokeCap = StrokeCap.round;
segmentProperties.defaultStrokeColor = strokePaint;
setShader(segmentProperties, strokePaint);
return strokePaint;
}