getStrokePaint method

  1. @override
Paint getStrokePaint()
override

Gets the border color of the series.

Implementation

@override
Paint getStrokePaint() {
  final SegmentProperties segmentProperties =
      SegmentHelper.getSegmentProperties(this);
  strokePaint = Paint()
    ..style = PaintingStyle.stroke
    ..strokeWidth = segmentProperties.strokeWidth!;
  segmentProperties.defaultStrokeColor = strokePaint;
  segmentProperties.series.borderGradient != null
      ? strokePaint!.shader = segmentProperties.series.borderGradient!
          .createShader(segmentProperties.currentPoint!.region!)
      : strokePaint!.color = segmentProperties.strokeColor!;
  segmentProperties.series.borderWidth == 0
      ? strokePaint!.color = Colors.transparent
      : strokePaint!.color;
  return strokePaint!;
}