lerp method

Interpolates between two styles for animated theme transitions.

Implementation

FdcGridHeaderStyle lerp(FdcGridHeaderStyle other, double t) {
  return FdcGridHeaderStyle(
    backgroundColor: Color.lerp(backgroundColor, other.backgroundColor, t),
    textStyle: TextStyle.lerp(textStyle, other.textStyle, t),
    groupHeight: lerpDouble(groupHeight, other.groupHeight, t),
    groupBackgroundColor: Color.lerp(
      groupBackgroundColor,
      other.groupBackgroundColor,
      t,
    ),
    groupTextStyle: TextStyle.lerp(groupTextStyle, other.groupTextStyle, t),
    groupAlignment: Alignment.lerp(groupAlignment, other.groupAlignment, t),
    groupPadding: EdgeInsetsGeometry.lerp(
      groupPadding,
      other.groupPadding,
      t,
    ),
    groupVerticalSeparatorInset: lerpDouble(
      groupVerticalSeparatorInset,
      other.groupVerticalSeparatorInset,
      t,
    ),
    verticalSeparatorInset: lerpDouble(
      verticalSeparatorInset,
      other.verticalSeparatorInset,
      t,
    ),
  );
}