lerp static method

Linearly interpolate between two MacosDatePickerThemeData.

All the properties must be non-null.

Implementation

static MacosDatePickerThemeData lerp(
  MacosDatePickerThemeData a,
  MacosDatePickerThemeData b,
  double t,
) {
  return MacosDatePickerThemeData(
    backgroundColor: Color.lerp(a.backgroundColor, b.backgroundColor, t),
    selectedElementColor:
        Color.lerp(a.selectedElementColor, b.selectedElementColor, t),
    selectedElementTextColor:
        Color.lerp(a.selectedElementTextColor, b.selectedElementTextColor, t),
    caretColor: Color.lerp(a.caretColor, b.caretColor, t),
    caretControlsBackgroundColor: Color.lerp(
      a.caretControlsBackgroundColor,
      b.caretControlsBackgroundColor,
      t,
    ),
    caretControlsSeparatorColor: Color.lerp(
      a.caretControlsSeparatorColor,
      b.caretControlsSeparatorColor,
      t,
    ),
    monthViewControlsColor:
        Color.lerp(a.monthViewControlsColor, b.monthViewControlsColor, t),
    monthViewHeaderColor:
        Color.lerp(a.monthViewHeaderColor, b.monthViewHeaderColor, t),
    monthViewSelectedDateColor: Color.lerp(
      a.monthViewSelectedDateColor,
      b.monthViewSelectedDateColor,
      t,
    ),
    monthViewSelectedDateTextColor: Color.lerp(
      a.monthViewSelectedDateTextColor,
      b.monthViewSelectedDateTextColor,
      t,
    ),
    monthViewCurrentDateColor: Color.lerp(
      a.monthViewCurrentDateColor,
      b.monthViewCurrentDateColor,
      t,
    ),
    monthViewWeekdayHeaderColor: Color.lerp(
      a.monthViewWeekdayHeaderColor,
      b.monthViewWeekdayHeaderColor,
      t,
    ),
    monthViewHeaderDividerColor: Color.lerp(
      a.monthViewHeaderDividerColor,
      b.monthViewHeaderDividerColor,
      t,
    ),
    monthViewDateColor:
        Color.lerp(a.monthViewDateColor, b.monthViewDateColor, t),
    shadowColor: Color.lerp(a.shadowColor, b.shadowColor, t),
  );
}