onPaint method

  1. @override
void onPaint(
  1. Canvas canvas
)
override

Draws segment in series bounds.

Implementation

@override
void onPaint(Canvas canvas) {
  _setSegmentProperties();
  if (fillPaint != null) {
    const double defaultAnimationFactor = 1;
    animateScatterSeries(
        SeriesHelper.getSeriesRendererDetails(
            _segmentProperties.seriesRenderer),
        _segmentProperties.point!,
        _segmentProperties.oldPoint,
        _segmentProperties.series.animationDuration > 0 == true &&
                _segmentProperties
                        .stateProperties.renderingDetails.isLegendToggled ==
                    false
            ? animationFactor
            : defaultAnimationFactor,
        canvas,
        fillPaint!,
        strokePaint!,
        currentSegmentIndex!,
        this);
  }
}