lerp method
Linearly interpolate between this and another FOtpFieldStyle using the given factor t.
Implementation
@useResult
FOtpFieldStyle lerp(FOtpFieldStyle other, double t) => .new(
keyboardAppearance: t < 0.5 ? keyboardAppearance : other.keyboardAppearance,
cursorColor: FColors.lerpColor(cursorColor, other.cursorColor, t) ?? cursorColor,
cursorWidth: lerpDouble(cursorWidth, other.cursorWidth, t) ?? cursorWidth,
cursorOpacityAnimates: t < 0.5 ? cursorOpacityAnimates : other.cursorOpacityAnimates,
itemSize: t < 0.5 ? itemSize : other.itemSize,
itemStyles: FOtpFieldItemStyles(.lerpWhere(itemStyles, other.itemStyles, t, (a, b, t) => a!.lerp(b!, t))),
dividerPadding: .lerp(dividerPadding, other.dividerPadding, t) ?? dividerPadding,
dividerSize: t < 0.5 ? dividerSize : other.dividerSize,
dividerColor: .lerpColor(dividerColor, other.dividerColor, 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),
);