lerp static method
- SfDataGridThemeData? a,
- SfDataGridThemeData? b,
- double t
Linearly interpolate between two themes.
Implementation
static SfDataGridThemeData? lerp(
SfDataGridThemeData? a, SfDataGridThemeData? b, double t) {
if (a == null && b == null) {
return null;
}
return SfDataGridThemeData(
gridLineColor: Color.lerp(a!.gridLineColor, b!.gridLineColor, t),
gridLineStrokeWidth:
lerpDouble(a.gridLineStrokeWidth, b.gridLineStrokeWidth, t),
selectionColor: Color.lerp(a.selectionColor, b.selectionColor, t),
currentCellStyle: DataGridCurrentCellStyle.lerp(
a.currentCellStyle, b.currentCellStyle, t),
frozenPaneLineColor:
Color.lerp(a.frozenPaneLineColor, b.frozenPaneLineColor, t),
frozenPaneLineWidth:
lerpDouble(a.frozenPaneLineWidth, b.frozenPaneLineWidth, t),
sortIconColor: Color.lerp(a.sortIconColor, b.sortIconColor, t),
headerHoverColor: Color.lerp(a.headerHoverColor, b.headerHoverColor, t),
headerColor: Color.lerp(a.headerColor, b.headerColor, t),
frozenPaneElevation:
lerpDouble(a.frozenPaneElevation, b.frozenPaneElevation, t),
rowHoverColor: Color.lerp(a.rowHoverColor, b.rowHoverColor, t),
columnResizeIndicatorColor: Color.lerp(
a.columnResizeIndicatorColor, b.columnResizeIndicatorColor, t),
columnResizeIndicatorStrokeWidth: lerpDouble(
a.columnResizeIndicatorStrokeWidth,
b.columnResizeIndicatorStrokeWidth,
t),
rowHoverTextStyle:
TextStyle.lerp(a.rowHoverTextStyle, b.rowHoverTextStyle, t),
filterIconColor: Color.lerp(a.filterIconColor, b.filterIconColor, t),
filterIconHoverColor:
Color.lerp(a.filterIconHoverColor, b.filterIconHoverColor, t),
sortOrderNumberColor:
Color.lerp(a.sortOrderNumberColor, b.sortOrderNumberColor, t),
sortOrderNumberBackgroundColor: Color.lerp(
a.sortOrderNumberBackgroundColor,
b.sortOrderNumberBackgroundColor,
t),
filterPopupTextStyle:
TextStyle.lerp(a.filterPopupTextStyle, b.filterPopupTextStyle, t),
filterPopupDisabledTextStyle: TextStyle.lerp(
a.filterPopupDisabledTextStyle, b.filterPopupDisabledTextStyle, t),
);
}