getHorizontalShift method Null safety

  1. @override
double getHorizontalShift(
  1. {RenderBox? parentBox,
  2. Offset? center,
  3. TextPainter? labelPainter,
  4. Animation<double>? activationAnimation,
  5. double? textScaleFactor,
  6. Size? sizeWithOverflow}

Determines the best offset to keep this shape on the screen.

Override this method when the center of the value indicator should be shifted from the vertical center of the thumb.


double getHorizontalShift({
  RenderBox? parentBox,
  Offset? center,
  TextPainter? labelPainter,
  Animation<double>? activationAnimation,
  double? textScaleFactor,
  Size? sizeWithOverflow,
}) {
  return _pathPainter.getHorizontalShift(
    center: center!,
    labelPainter: labelPainter!,
    scale: activationAnimation!.value,
    textScaleFactor: textScaleFactor!,
    sizeWithOverflow: sizeWithOverflow!,