paintSegments method

  1. @override
void paintSegments(
  1. PaintingContext context,
  2. Offset offset
)
inherited

Implementation

@override
void paintSegments(PaintingContext context, Offset offset) {
  if (parent != null && parent!.render != SeriesRender.normal) {
    return;
  }

  if (segments.isNotEmpty) {
    context.canvas.save();
    context.canvas.clipRect(paintBounds);
    final ChartSegment segment = segments[0];
    segment.animationFactor = segmentAnimationFactor;
    segment.onPaint(context.canvas);
    context.canvas.restore();
  }
}