getStrokePaint method

  1. @override
Paint getStrokePaint()
override

Gets the border color of the series.

Implementation

@override
Paint getStrokePaint() {
  strokePaint = Paint()
    ..style = PaintingStyle.stroke
    ..strokeWidth = _currentPoint!.isEmpty != null && _currentPoint!.isEmpty!
        ? _series.emptyPointSettings.borderWidth
        : _strokeWidth!;
  if (_series.borderGradient != null) {
    strokePaint!.shader =
        _series.borderGradient!.createShader(_currentPoint!.region!);
  } else if (_strokeColor != null) {
    strokePaint!.color =
        _currentPoint!.isEmpty != null && _currentPoint!.isEmpty!
            ? _series.emptyPointSettings.borderColor
            : _strokeColor!;
  }
  _defaultStrokeColor = strokePaint;
  _series.borderWidth == 0
      ? strokePaint!.color = Colors.transparent
      : strokePaint!.color;
  return strokePaint!;
}