getFillPaint method

  1. @override
Paint getFillPaint()
override

Gets the color of the series.

Implementation

@override
Paint getFillPaint() {
  final SegmentProperties segmentProperties =
      SegmentHelper.getSegmentProperties(this);
  final Paint fillPaint = Paint();
  assert(segmentProperties.series.opacity >= 0 == true,
      'The opacity value of the spline series should be greater than or equal to 0.');
  assert(segmentProperties.series.opacity <= 1 == true,
      'The opacity value of the spline series should be less than or equal to 1.');
  if (segmentProperties.strokeColor != null) {
    fillPaint.color = segmentProperties.strokeColor!
        .withOpacity(segmentProperties.series.opacity);
  }
  fillPaint.strokeWidth = segmentProperties.strokeWidth!;
  fillPaint.style = PaintingStyle.stroke;
  segmentProperties.defaultFillColor = fillPaint;
  return fillPaint;
}