getStrokePaint method

  1. @override
Paint getStrokePaint()
override

Gets the stroke color of the series.

Implementation

@override
Paint getStrokePaint() {
  final SegmentProperties segmentProperties =
      SegmentHelper.getSegmentProperties(this);
  final Paint strokePaint = Paint();
  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.square;
  segmentProperties.defaultStrokeColor = strokePaint;
  setShader(segmentProperties, strokePaint);
  return strokePaint;
}