lerp static method
Linearly interpolate between two themes.
Implementation
static SfChartThemeData? lerp(
SfChartThemeData? a, SfChartThemeData? b, double t) {
if (a == null && b == null) {
return null;
}
return SfChartThemeData(
axisLabelColor: Color.lerp(a!.axisLabelColor, b!.axisLabelColor, t),
axisLineColor: Color.lerp(a.axisLineColor, b.axisLineColor, t),
axisTitleColor: Color.lerp(a.axisTitleColor, b.axisTitleColor, t),
backgroundColor: Color.lerp(a.backgroundColor, b.backgroundColor, t),
titleTextColor: Color.lerp(a.titleTextColor, b.titleTextColor, t),
crosshairBackgroundColor:
Color.lerp(a.crosshairBackgroundColor, b.crosshairBackgroundColor, t),
crosshairLabelColor:
Color.lerp(a.crosshairLabelColor, b.crosshairLabelColor, t),
crosshairLineColor:
Color.lerp(a.crosshairLineColor, b.crosshairLineColor, t),
legendBackgroundColor:
Color.lerp(a.legendBackgroundColor, b.legendBackgroundColor, t),
legendTextColor: Color.lerp(a.legendTextColor, b.legendTextColor, t),
legendTitleColor: Color.lerp(a.legendTitleColor, b.legendTitleColor, t),
majorGridLineColor:
Color.lerp(a.majorGridLineColor, b.majorGridLineColor, t),
majorTickLineColor:
Color.lerp(a.majorTickLineColor, b.majorTickLineColor, t),
minorGridLineColor:
Color.lerp(a.minorGridLineColor, b.minorGridLineColor, t),
minorTickLineColor:
Color.lerp(a.minorTickLineColor, b.minorTickLineColor, t),
plotAreaBackgroundColor:
Color.lerp(a.plotAreaBackgroundColor, b.plotAreaBackgroundColor, t),
plotAreaBorderColor:
Color.lerp(a.plotAreaBorderColor, b.plotAreaBorderColor, t),
selectionRectColor:
Color.lerp(a.selectionRectColor, b.selectionRectColor, t),
selectionRectBorderColor:
Color.lerp(a.selectionRectBorderColor, b.selectionRectBorderColor, t),
selectionTooltipConnectorLineColor: Color.lerp(
a.selectionTooltipConnectorLineColor,
b.selectionTooltipConnectorLineColor,
t),
titleBackgroundColor:
Color.lerp(a.titleBackgroundColor, b.titleBackgroundColor, t),
tooltipColor: Color.lerp(a.tooltipColor, b.tooltipColor, t),
tooltipSeparatorColor:
Color.lerp(a.tooltipSeparatorColor, b.tooltipSeparatorColor, t),
tooltipLabelColor:
Color.lerp(a.tooltipLabelColor, b.tooltipLabelColor, t),
waterfallConnectorLineColor: Color.lerp(
a.waterfallConnectorLineColor, b.waterfallConnectorLineColor, t),
titleTextStyle: TextStyle.lerp(a.titleTextStyle, b.titleTextStyle, t),
axisTitleTextStyle:
TextStyle.lerp(a.axisTitleTextStyle, b.axisTitleTextStyle, t),
axisLabelTextStyle:
TextStyle.lerp(a.axisLabelTextStyle, b.axisLabelTextStyle, t),
axisMultiLevelLabelTextStyle: TextStyle.lerp(
a.axisMultiLevelLabelTextStyle, b.axisMultiLevelLabelTextStyle, t),
plotBandLabelTextStyle:
TextStyle.lerp(a.plotBandLabelTextStyle, b.plotBandLabelTextStyle, t),
legendTitleTextStyle:
TextStyle.lerp(a.legendTitleTextStyle, b.legendTitleTextStyle, t),
legendTextStyle: TextStyle.lerp(a.legendTextStyle, b.legendTextStyle, t),
dataLabelTextStyle:
TextStyle.lerp(a.dataLabelTextStyle, b.dataLabelTextStyle, t),
tooltipTextStyle:
TextStyle.lerp(a.tooltipTextStyle, b.tooltipTextStyle, t),
trackballTextStyle:
TextStyle.lerp(a.trackballTextStyle, b.trackballTextStyle, t),
crosshairTextStyle:
TextStyle.lerp(a.crosshairTextStyle, b.crosshairTextStyle, t),
selectionZoomingTooltipTextStyle: TextStyle.lerp(
a.selectionZoomingTooltipTextStyle,
b.selectionZoomingTooltipTextStyle,
t),
);
}