lerp method

Interpolates between two styles for animated theme transitions.

Implementation

FdcGridProgressStyle lerp(FdcGridProgressStyle other, double t) {
  return FdcGridProgressStyle(
    color: Color.lerp(color, other.color, t),
    backgroundColor: Color.lerp(backgroundColor, other.backgroundColor, t),
    showText: t < 0.5 ? showText : other.showText,
    textStyle: TextStyle.lerp(textStyle, other.textStyle, t),
    height: lerpDouble(height, other.height, t),
    borderRadius: BorderRadiusGeometry.lerp(
      borderRadius,
      other.borderRadius,
      t,
    ),
    border: t < 0.5 ? border : other.border,
  );
}