getStrokePaint method

  1. @override
Paint getStrokePaint()
override

Gets the border color of the series.

Implementation

@override
Paint getStrokePaint() {
  _setSegmentProperties();
  final SegmentProperties candleSegmentProperties = _segmentProperties;
  final Paint strokePaint = Paint();
  if (candleSegmentProperties.strokeColor != null) {
    strokePaint.color = _segmentProperties.pointColorMapper ??
        candleSegmentProperties.strokeColor!;
    strokePaint.color = (candleSegmentProperties.series.opacity < 1 &&
            strokePaint.color != Colors.transparent)
        ? strokePaint.color
            .withOpacity(candleSegmentProperties.series.opacity)
        : strokePaint.color;
  }
  strokePaint.strokeWidth = candleSegmentProperties.strokeWidth!;
  strokePaint.style = PaintingStyle.stroke;
  strokePaint.strokeCap = StrokeCap.round;
  candleSegmentProperties.defaultStrokeColor = strokePaint;
  return strokePaint;
}