lerp static method

Linearly interpolate between two date picker themes.

The argument t must not be null.

Implementation

static ZeroDatePickerStyle lerp(
    ZeroDatePickerStyle? a, ZeroDatePickerStyle? b, double t) {
  return ZeroDatePickerStyle(
      headerBackgroundColor:
          Color.lerp(a?.headerBackgroundColor, b?.headerBackgroundColor, t),
      pickerBackgroundColor:
          Color.lerp(a?.pickerBackgroundColor, b?.pickerBackgroundColor, t),
      entryModeIconColor:
          Color.lerp(a?.entryModeIconColor, b?.entryModeIconColor, t),
      helpTextStyle: TextStyle.lerp(a?.helpTextStyle, b?.helpTextStyle, t),
      dateTextStyle: TextStyle.lerp(a?.dateTextStyle, b?.dateTextStyle, t),
      shape: ShapeBorder.lerp(a?.shape, b?.shape, t),
      textfieldStyle: t < 0.5 ? a?.textfieldStyle : b?.textfieldStyle,
      calendarStyle: ZeroCalendarPickerStyle.lerp(
          a?.calendarStyle, b?.calendarStyle, t));
}