paint method

void paint(
  1. PaintingContext context,
  2. Offset center, {
  3. required RenderBox parentBox,
  4. required SfSliderThemeData themeData,
  5. SfRangeValues? currentValues,
  6. dynamic currentValue,
  7. required Paint? paint,
  8. required Animation<double> animation,
  9. required SfThumb? thumb,
})

Paints the overlay based on the values passed to it.

Implementation

void paint(PaintingContext context, Offset center,
    {required RenderBox parentBox,
    required SfSliderThemeData themeData,
    SfRangeValues? currentValues,
    dynamic currentValue,
    required Paint? paint,
    required Animation<double> animation,
    required SfThumb? thumb}) {
  final double radius = getPreferredSize(themeData).width / 2;
  final Tween<double> tween = Tween<double>(begin: 0.0, end: radius);

  if (paint == null) {
    paint = Paint();
    paint.color = themeData.overlayColor!;
  }
  context.canvas.drawCircle(center, tween.evaluate(animation), paint);
}