getStrokePaint method

  1. @override
Paint getStrokePaint()
override

Gets the border color of the series.

Implementation

@override
Paint getStrokePaint() {
  _setSegmentProperties();
  strokePaint = Paint()
    ..style = PaintingStyle.stroke
    ..strokeWidth = (_segmentProperties.currentPoint!.isEmpty ?? false)
        ? _segmentProperties.series.emptyPointSettings.borderWidth
        : _segmentProperties.strokeWidth!;
  _segmentProperties.series.borderGradient != null
      ? strokePaint!.shader = _segmentProperties.series.borderGradient!
          .createShader(_segmentProperties.currentPoint!.region!)
      : strokePaint!.color =
          (_segmentProperties.currentPoint!.isEmpty ?? false)
              ? _segmentProperties.series.emptyPointSettings.borderColor
              : _segmentProperties.strokeColor!;
  _segmentProperties.series.borderWidth == 0
      ? strokePaint!.color = Colors.transparent
      : strokePaint!.color;
  _segmentProperties.defaultStrokeColor = strokePaint;
  return strokePaint!;
}