lerp method

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

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

Implementation

@useResult
FTextFieldStyle lerp(FTextFieldStyle other, double t) => FTextFieldStyle(
  keyboardAppearance: t < 0.5 ? keyboardAppearance : other.keyboardAppearance,
  cursorColor: Color.lerp(cursorColor, other.cursorColor, t) ?? cursorColor,
  fillColor: Color.lerp(fillColor, other.fillColor, t) ?? fillColor,
  filled: t < 0.5 ? filled : other.filled,
  contentPadding: EdgeInsetsGeometry.lerp(contentPadding, other.contentPadding, t) ?? contentPadding,
  clearButtonPadding: EdgeInsetsGeometry.lerp(clearButtonPadding, other.clearButtonPadding, t) ?? clearButtonPadding,
  obscureButtonPadding:
      EdgeInsetsGeometry.lerp(obscureButtonPadding, other.obscureButtonPadding, t) ?? obscureButtonPadding,
  scrollPadding: EdgeInsets.lerp(scrollPadding, other.scrollPadding, t) ?? scrollPadding,
  clearButtonStyle: clearButtonStyle.lerp(other.clearButtonStyle, t),
  obscureButtonStyle: obscureButtonStyle.lerp(other.obscureButtonStyle, t),
  contentTextStyle: FWidgetStateMap.lerpTextStyle(contentTextStyle, other.contentTextStyle, t),
  hintTextStyle: FWidgetStateMap.lerpTextStyle(hintTextStyle, other.hintTextStyle, t),
  counterTextStyle: FWidgetStateMap.lerpTextStyle(counterTextStyle, other.counterTextStyle, t),
  border: t < 0.5 ? border : other.border,
  labelPadding: EdgeInsetsGeometry.lerp(labelPadding, other.labelPadding, t) ?? labelPadding,
  descriptionPadding: EdgeInsetsGeometry.lerp(descriptionPadding, other.descriptionPadding, t) ?? descriptionPadding,
  errorPadding: EdgeInsetsGeometry.lerp(errorPadding, other.errorPadding, t) ?? errorPadding,
  childPadding: EdgeInsetsGeometry.lerp(childPadding, other.childPadding, t) ?? childPadding,
  labelTextStyle: FWidgetStateMap.lerpTextStyle(labelTextStyle, other.labelTextStyle, t),
  descriptionTextStyle: FWidgetStateMap.lerpTextStyle(descriptionTextStyle, other.descriptionTextStyle, t),
  errorTextStyle: TextStyle.lerp(errorTextStyle, other.errorTextStyle, t) ?? errorTextStyle,
);