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 step line series should be greater than or equal to 0.');
  assert(segmentProperties.series.opacity <= 1 == true,
      'The opacity value of the step line series should be less than or equal to 1.');
  if (segmentProperties.color != null) {
    fillPaint.color = segmentProperties.color!
        .withOpacity(segmentProperties.series.opacity);
  }
  fillPaint.strokeWidth = segmentProperties.strokeWidth!;
  fillPaint.style = PaintingStyle.stroke;
  segmentProperties.defaultFillColor = fillPaint;
  return fillPaint;
}