getStrokePaint method

  1. @override
Paint getStrokePaint()
override

Gets the border color of the series.

Implementation

@override
Paint getStrokePaint() {
  final Paint _strokePaint = Paint();
  _strokePaint
    ..style = PaintingStyle.stroke
    ..strokeWidth = _series.borderWidth;
  if (_series.borderGradient != null && _borderPath != null) {
    _strokePaint.shader =
        _series.borderGradient!.createShader(_borderPath!.getBounds());
  } else if (_strokeColor != null) {
    _strokePaint.color = _series.borderColor;
  }
  _series.borderWidth == 0
      ? _strokePaint.color = Colors.transparent
      : _strokePaint.color;
  _strokePaint.strokeCap = StrokeCap.round;
  _defaultStrokeColor = _strokePaint;
  return _strokePaint;
}