lerp method

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

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

Implementation

@useResult
FToastStyle lerp(FToastStyle other, double t) => FToastStyle(
  constraints: BoxConstraints.lerp(constraints, other.constraints, t) ?? constraints,
  decoration: BoxDecoration.lerp(decoration, other.decoration, t) ?? decoration,
  backgroundFilter: t < 0.5 ? backgroundFilter : other.backgroundFilter,
  padding: EdgeInsetsGeometry.lerp(padding, other.padding, t) ?? padding,
  iconStyle: IconThemeData.lerp(iconStyle, other.iconStyle, t),
  iconSpacing: lerpDouble(iconSpacing, other.iconSpacing, t) ?? iconSpacing,
  titleTextStyle: TextStyle.lerp(titleTextStyle, other.titleTextStyle, t) ?? titleTextStyle,
  titleSpacing: lerpDouble(titleSpacing, other.titleSpacing, t) ?? titleSpacing,
  descriptionTextStyle: TextStyle.lerp(descriptionTextStyle, other.descriptionTextStyle, t) ?? descriptionTextStyle,
  suffixSpacing: lerpDouble(suffixSpacing, other.suffixSpacing, t) ?? suffixSpacing,
  motion: motion.lerp(other.motion, t),
);