getStrokePaint method

  1. @override
Paint getStrokePaint()
override

Gets the border color of the series.

Implementation

@override
Paint getStrokePaint() {
  final Paint strokePaint = Paint();
  assert(_series.opacity >= 0,
      'The opacity value of the Hilo open-close series should be greater than or equal to 0.');
  assert(_series.opacity <= 1,
      'The opacity value of the Hilo open-close series should be less than or equal to 1.');
  if (_strokeColor != null) {
    strokePaint.color =
        _currentPoint!.isEmpty != null && _currentPoint!.isEmpty!
            ? _series.emptyPointSettings.color
            : _pointColorMapper ?? _strokeColor!;
    strokePaint.color =
        (_series.opacity < 1 && strokePaint.color != Colors.transparent)
            ? strokePaint.color.withOpacity(_series.opacity)
            : strokePaint.color;
  }
  strokePaint.strokeWidth = _strokeWidth!;
  strokePaint.style = PaintingStyle.stroke;
  strokePaint.strokeCap = StrokeCap.round;
  _defaultStrokeColor = strokePaint;
  return strokePaint;
}