lerp method
Linearly interpolate between this and another FSwitchStyle using the given factor t.
Implementation
@useResult
FSwitchStyle lerp(FSwitchStyle other, double t) => .new(
focusColor: FColors.lerpColor(focusColor, other.focusColor, t) ?? focusColor,
trackColor: .lerpColor(trackColor, other.trackColor, t),
thumbColor: .lerpColor(thumbColor, other.thumbColor, t),
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,
labelMotion: labelMotion.lerp(other.labelMotion, t),
labelTextStyle: .lerpTextStyle(labelTextStyle, other.labelTextStyle, t),
descriptionTextStyle: .lerpTextStyle(descriptionTextStyle, other.descriptionTextStyle, t),
errorTextStyle: .lerpTextStyle(errorTextStyle, other.errorTextStyle, t),
);