getStrokePaint method

  1. @override
Paint getStrokePaint()
override

Gets the stroke color of the series.

Implementation

@override
Paint getStrokePaint() {
  final Paint _strokePaint = Paint();
  assert(_series.opacity >= 0,
      'The opacity value of the Hilo series should be greater than or equal to 0.');
  assert(_series.opacity <= 1,
      'The opacity value of the Hilo 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;
}