lerp static method

Implementation

static SliderThemeData lerp(SliderThemeData a, SliderThemeData b, double t) {
  return SliderThemeData(
    margin: EdgeInsetsGeometry.lerp(a.margin, b.margin, t),
    thumbColor: ButtonState.lerp(a.thumbColor, b.thumbColor, t, Color.lerp),
    thumbRadius:
        ButtonState.lerp(a.thumbRadius, b.thumbRadius, t, lerpDouble),
    trackHeight:
        ButtonState.lerp(a.trackHeight, b.trackHeight, t, lerpDouble),
    activeColor:
        ButtonState.lerp(a.activeColor, b.activeColor, t, Color.lerp),
    inactiveColor:
        ButtonState.lerp(a.inactiveColor, b.inactiveColor, t, Color.lerp),
    labelBackgroundColor:
        Color.lerp(a.labelBackgroundColor, b.labelBackgroundColor, t),
    labelForegroundColor:
        Color.lerp(a.labelForegroundColor, b.labelForegroundColor, t),
    useThumbBall: t < 0.5 ? a.useThumbBall : b.useThumbBall,
  );
}