lerp method

  1. @useResult
FSliderStyle lerp(
  1. FSliderStyle other,
  2. double t
)

Linearly interpolate between this and another FSliderStyle using the given factor t.

Implementation

@useResult
FSliderStyle lerp(FSliderStyle other, double t) => .new(
  activeColor: .lerpColor(activeColor, other.activeColor, t),
  inactiveColor: .lerpColor(inactiveColor, other.inactiveColor, t),
  borderRadius: .lerp(borderRadius, other.borderRadius, t) ?? borderRadius,
  crossAxisExtent: lerpDouble(crossAxisExtent, other.crossAxisExtent, t) ?? crossAxisExtent,
  thumbSize: lerpDouble(thumbSize, other.thumbSize, t) ?? thumbSize,
  thumbStyle: thumbStyle.lerp(other.thumbStyle, t),
  markStyle: markStyle.lerp(other.markStyle, t),
  tooltipStyle: tooltipStyle.lerp(other.tooltipStyle, t),
  tooltipMotion: tooltipMotion.lerp(other.tooltipMotion, t),
  tooltipTipAnchor: .lerp(tooltipTipAnchor, other.tooltipTipAnchor, t) ?? tooltipTipAnchor,
  tooltipThumbAnchor: .lerp(tooltipThumbAnchor, other.tooltipThumbAnchor, t) ?? tooltipThumbAnchor,
  labelPadding: .lerp(labelPadding, other.labelPadding, t) ?? labelPadding,
  descriptionPadding: .lerp(descriptionPadding, other.descriptionPadding, t) ?? descriptionPadding,
  errorPadding: .lerp(errorPadding, other.errorPadding, t) ?? errorPadding,
  childPadding: .lerp(childPadding, other.childPadding, t) ?? childPadding,
  labelTextStyle: .lerpTextStyle(labelTextStyle, other.labelTextStyle, t),
  descriptionTextStyle: .lerpTextStyle(descriptionTextStyle, other.descriptionTextStyle, t),
  errorTextStyle: .lerp(errorTextStyle, other.errorTextStyle, t) ?? errorTextStyle,
);