lerp method

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

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

Implementation

@useResult
FAvatarStyle lerp(FAvatarStyle other, double t) => FAvatarStyle(
  backgroundColor: Color.lerp(backgroundColor, other.backgroundColor, t) ?? backgroundColor,
  foregroundColor: Color.lerp(foregroundColor, other.foregroundColor, t) ?? foregroundColor,
  textStyle: TextStyle.lerp(textStyle, other.textStyle, t) ?? textStyle,
  fadeInDuration: t < 0.5 ? fadeInDuration : other.fadeInDuration,
);