content: import 'package:flutter/material.dart';
  
  class CustomValueIndicatorShape extends SliderComponentShape {
    final _indicatorShape = const PaddleSliderValueIndicatorShape();
    final bool tranform;
    const CustomValueIndicatorShape({this.tranform = false});
    @override
    Size getPreferredSize(bool isEnabled, bool isDiscrete) {
      return const Size(40, 40);
    }
  
    @override
    void paint(
      PaintingContext context,
      Offset center, {
      required Animation<double> activationAnimation,
      required Animation<double> enableAnimation,
      required bool isDiscrete,
      required TextPainter labelPainter,
      required RenderBox parentBox,
      required SliderThemeData sliderTheme,
      required TextDirection textDirection,
      required double value,
      required double textScaleFactor,
      required Size sizeWithOverflow,
    }) {
      final textSpan = TextSpan(
        text: labelPainter.text?.toPlainText(),
        style: sliderTheme.valueIndicatorTextStyle,
      );
  
      final textPainter = TextPainter(
        text: textSpan,
        textAlign: labelPainter.textAlign,
        textDirection: textDirection,
      );
  
      textPainter.layout();
  
      context.canvas.save();
      context.canvas.translate(center.dx, center.dy);
      context.canvas.scale(tranform ? -1.0 : 1.0, 1.0);
      context.canvas.translate(-center.dx, -center.dy);
  
      _indicatorShape.paint(
        context,
        center,
        activationAnimation: activationAnimation,
        enableAnimation: enableAnimation,
        labelPainter: textPainter,
        parentBox: parentBox,
        sliderTheme: sliderTheme,
        value: value,
        textScaleFactor: textScaleFactor,
        sizeWithOverflow: sizeWithOverflow,
        isDiscrete: isDiscrete,
        textDirection: textDirection,
      );
  
      context.canvas.restore();
    }
  }
  