lerp static method

Linearly interpolate between two themes.

Implementation

static SfCalendarThemeData? lerp(
    SfCalendarThemeData? a, SfCalendarThemeData? b, double t) {
  if (a == null && b == null) {
    return null;
  }
  return SfCalendarThemeData(
      backgroundColor: Color.lerp(a!.backgroundColor, b!.backgroundColor, t),
      headerBackgroundColor:
          Color.lerp(a.headerBackgroundColor, b.headerBackgroundColor, t),
      agendaBackgroundColor:
          Color.lerp(a.agendaBackgroundColor, b.agendaBackgroundColor, t),
      cellBorderColor: Color.lerp(a.cellBorderColor, b.cellBorderColor, t),
      selectionBorderColor:
          Color.lerp(a.selectionBorderColor, b.selectionBorderColor, t),
      activeDatesBackgroundColor: Color.lerp(
          a.activeDatesBackgroundColor, b.activeDatesBackgroundColor, t),
      todayBackgroundColor:
          Color.lerp(a.todayBackgroundColor, b.todayBackgroundColor, t),
      trailingDatesBackgroundColor: Color.lerp(
          a.trailingDatesBackgroundColor, b.trailingDatesBackgroundColor, t),
      leadingDatesBackgroundColor: Color.lerp(
          a.leadingDatesBackgroundColor, b.leadingDatesBackgroundColor, t),
      todayHighlightColor:
          Color.lerp(a.todayHighlightColor, b.todayHighlightColor, t),
      viewHeaderBackgroundColor: Color.lerp(
          a.viewHeaderBackgroundColor, b.viewHeaderBackgroundColor, t),
      weekNumberBackgroundColor: Color.lerp(
          a.weekNumberBackgroundColor, b.weekNumberBackgroundColor, t),
      allDayPanelColor:
          Color.lerp(a.allDayPanelColor, b.allDayPanelColor, t));
}