lerp static method

Linearly interpolate between two date picker themes.

The argument t must not be null.

Implementation

static ZeroCalendarPickerStyle lerp(
    ZeroCalendarPickerStyle? a, ZeroCalendarPickerStyle? b, double t) {
  return ZeroCalendarPickerStyle(
    dayTextStyle: TextStyle.lerp(a?.dayTextStyle, b?.dayTextStyle, t),
    headerTextStyle:
        TextStyle.lerp(a?.headerTextStyle, b?.headerTextStyle, t),
    enabledDayColor: Color.lerp(a?.enabledDayColor, b?.enabledDayColor, t),
    disabledDayColor: Color.lerp(a?.disabledDayColor, b?.disabledDayColor, t),
    selectedDayBackground:
        Color.lerp(a?.selectedDayBackground, b?.selectedDayBackground, t),
    selectedDayColor: Color.lerp(a?.selectedDayColor, b?.selectedDayColor, t),
    todayColor: Color.lerp(a?.todayColor, b?.todayColor, t),
    highlightColor: Color.lerp(a?.highlightColor, b?.highlightColor, t),
    controlColor: Color.lerp(a?.controlColor, b?.controlColor, t),
    inactiveControlColor:
        Color.lerp(a?.inactiveControlColor, b?.inactiveControlColor, t),
    monthListTileStyle: ZeroListTileStyle.lerp(
        a?.monthListTileStyle, b?.monthListTileStyle, t),
    yearListTileStyle:
        ZeroListTileStyle.lerp(a?.yearListTileStyle, b?.yearListTileStyle, t),
    monthLeftIcon: t < 0.5 ? a?.monthLeftIcon : b?.monthLeftIcon,
    yearLeftIcon: t < 0.5 ? a?.yearLeftIcon : b?.yearLeftIcon,
  );
}