lerp method

Interpolates between two styles for animated theme transitions.

Implementation

FdcGridHeaderFilterStyle lerp(FdcGridHeaderFilterStyle other, double t) {
  return FdcGridHeaderFilterStyle(
    backgroundColor: Color.lerp(backgroundColor, other.backgroundColor, t),
    height: lerpDouble(height, other.height, t),
    focusedBorderColor: Color.lerp(
      focusedBorderColor,
      other.focusedBorderColor,
      t,
    ),
    unfocusedBorderColor: Color.lerp(
      unfocusedBorderColor,
      other.unfocusedBorderColor,
      t,
    ),
    focusedBorderWidth: lerpDouble(
      focusedBorderWidth,
      other.focusedBorderWidth,
      t,
    ),
    unfocusedBorderWidth: lerpDouble(
      unfocusedBorderWidth,
      other.unfocusedBorderWidth,
      t,
    ),
    focusedLabelColor: Color.lerp(
      focusedLabelColor,
      other.focusedLabelColor,
      t,
    ),
    unfocusedLabelColor: Color.lerp(
      unfocusedLabelColor,
      other.unfocusedLabelColor,
      t,
    ),
    labelTextStyle: TextStyle.lerp(labelTextStyle, other.labelTextStyle, t),
    filterIconColor: Color.lerp(filterIconColor, other.filterIconColor, t),
    activeFilterIconColor: Color.lerp(
      activeFilterIconColor,
      other.activeFilterIconColor,
      t,
    ),
    clearIconColor: Color.lerp(clearIconColor, other.clearIconColor, t),
  );
}