lerp method
Interpolates between two styles for animated theme transitions.
Implementation
FdcGridStyle lerp(FdcGridStyle other, double t) {
return FdcGridStyle(
gridLines: t < 0.5 ? gridLines : other.gridLines,
gridLineColor: Color.lerp(gridLineColor, other.gridLineColor, t),
pinnedSeparatorInset: lerpDouble(
pinnedSeparatorInset,
other.pinnedSeparatorInset,
t,
),
verticalGridLines: t < 0.5 ? verticalGridLines : other.verticalGridLines,
borderColor: Color.lerp(borderColor, other.borderColor, t),
backgroundColor: Color.lerp(backgroundColor, other.backgroundColor, t),
rowIndicatorBackgroundColor: Color.lerp(
rowIndicatorBackgroundColor,
other.rowIndicatorBackgroundColor,
t,
),
cellTextStyle: TextStyle.lerp(cellTextStyle, other.cellTextStyle, t),
disabledCellBackgroundColor: Color.lerp(
disabledCellBackgroundColor,
other.disabledCellBackgroundColor,
t,
),
selectedCellBackgroundColor: Color.lerp(
selectedCellBackgroundColor,
other.selectedCellBackgroundColor,
t,
),
selectedRowColor: Color.lerp(selectedRowColor, other.selectedRowColor, t),
);
}