lerp static method

Linearly interpolate between two themes.

Implementation

static SfDateRangePickerThemeData? lerp(
    SfDateRangePickerThemeData? a, SfDateRangePickerThemeData? b, double t) {
  if (a == null && b == null) {
    return null;
  }
  return SfDateRangePickerThemeData(
    backgroundColor: Color.lerp(a!.backgroundColor, b!.backgroundColor, t),
    rangeSelectionColor:
        Color.lerp(a.rangeSelectionColor, b.rangeSelectionColor, t),
    selectionColor: Color.lerp(a.selectionColor, b.selectionColor, t),
    startRangeSelectionColor:
        Color.lerp(a.startRangeSelectionColor, b.startRangeSelectionColor, t),
    endRangeSelectionColor:
        Color.lerp(a.endRangeSelectionColor, b.endRangeSelectionColor, t),
    headerBackgroundColor:
        Color.lerp(a.headerBackgroundColor, b.headerBackgroundColor, t),
    viewHeaderBackgroundColor: Color.lerp(
        a.viewHeaderBackgroundColor, b.viewHeaderBackgroundColor, t),
    todayHighlightColor:
        Color.lerp(a.todayHighlightColor, b.todayHighlightColor, t),
    weekNumberBackgroundColor: Color.lerp(
        a.weekNumberBackgroundColor, b.weekNumberBackgroundColor, t),
  );
}