getFillPaint method

  1. @override
Paint getFillPaint()
override

Gets the color of the series.

Implementation

@override
Paint getFillPaint() {
  _setSegmentProperties();

  final Paint fillPaint = Paint();
  assert(_segmentProperties.series.opacity >= 0 == true,
      'The opacity value of the line series should be greater than or equal to 0.');
  assert(_segmentProperties.series.opacity <= 1 == true,
      'The opacity value of the line series should be less than or equal to 1.');
  if (_segmentProperties.color != null) {
    fillPaint.color = _segmentProperties.pointColorMapper ??
        _segmentProperties.color!
            .withOpacity(_segmentProperties.series.opacity);
  }
  fillPaint.strokeWidth = _segmentProperties.strokeWidth!;
  fillPaint.style = PaintingStyle.fill;
  _segmentProperties.defaultFillColor = fillPaint;
  return fillPaint;
}