lerp method

Interpolates between two styles for animated theme transitions.

Implementation

FdcGridSummaryStyle lerp(FdcGridSummaryStyle other, double t) {
  return FdcGridSummaryStyle(
    backgroundColor: Color.lerp(backgroundColor, other.backgroundColor, t),
    showTopSeparator: t < 0.5 ? showTopSeparator : other.showTopSeparator,
    textStyle: TextStyle.lerp(textStyle, other.textStyle, t),
    height: lerpDouble(height, other.height, t),
    padding: EdgeInsetsGeometry.lerp(padding, other.padding, t),
    showVerticalSeparators: t < 0.5
        ? showVerticalSeparators
        : other.showVerticalSeparators,
    verticalSeparatorInset: lerpDouble(
      verticalSeparatorInset,
      other.verticalSeparatorInset,
      t,
    ),
  );
}