paint abstract method

void paint(
  1. PaintingContext context,
  2. Offset center,
  3. {required RenderBox parentBox,
  4. required SliderThemeData sliderTheme,
  5. required Animation<double> enableAnimation,
  6. required Offset startThumbCenter,
  7. required Offset endThumbCenter,
  8. bool isEnabled,
  9. required TextDirection textDirection}

Paints the slider track.

The context argument represents the RangeSlider's render box.

The center argument is the offset for where this shape's center should be painted. This offset is relative to the origin of the context canvas.

The parentBox argument is the RenderBox of the RangeSlider. Its attributes, such as size, can be used to assist in painting this shape.

The sliderTheme argument is the theme assigned to the RangeSlider that this shape belongs to.

The enableAnimation argument is an animation triggered when the RangeSlider is enabled, and it reverses when the slider is disabled. The RangeSlider is enabled when RangeSlider.onChanged is not null. Use this to paint intermediate frames for this shape when the slider changes enabled state.

The isEnabled argument is false when RangeSlider.onChanged is null and true otherwise. When true, the slider will respond to input.

The textDirection argument can be used to determine how the tick marks are painted depending on whether they are on an active track segment or not.

The track segment between the two thumbs is the active track segment. The track segments between the thumb and each end of the slider are the inactive track segments. In TextDirection.ltr, the start of the slider is on the left, and in TextDirection.rtl, the start of the slider is on the right.


void paint(
  PaintingContext context,
  Offset center, {
  required RenderBox parentBox,
  required SliderThemeData sliderTheme,
  required Animation<double> enableAnimation,
  required Offset startThumbCenter,
  required Offset endThumbCenter,
  bool isEnabled,
  required TextDirection textDirection,