lerp static method

Linearly interpolate between two styles.

Implementation

static PdfPasswordDialogStyle? lerp(
    PdfPasswordDialogStyle? a, PdfPasswordDialogStyle? b, double t) {
  if (a == null && b == null) {
    return null;
  }
  return PdfPasswordDialogStyle(
    backgroundColor: Color.lerp(a!.backgroundColor, b!.backgroundColor, t),
    headerTextStyle: TextStyle.lerp(a.headerTextStyle, b.headerTextStyle, t),
    contentTextStyle:
        TextStyle.lerp(a.contentTextStyle, b.contentTextStyle, t),
    inputFieldTextStyle:
        TextStyle.lerp(a.inputFieldTextStyle, b.inputFieldTextStyle, t),
    inputFieldHintTextStyle: TextStyle.lerp(
        a.inputFieldHintTextStyle, b.inputFieldHintTextStyle, t),
    inputFieldLabelTextStyle: TextStyle.lerp(
        a.inputFieldLabelTextStyle, b.inputFieldLabelTextStyle, t),
    errorTextStyle: TextStyle.lerp(a.errorTextStyle, b.errorTextStyle, t),
    openTextStyle: TextStyle.lerp(a.openTextStyle, b.openTextStyle, t),
    cancelTextStyle: TextStyle.lerp(a.cancelTextStyle, b.cancelTextStyle, t),
    closeIconColor: Color.lerp(a.closeIconColor, b.closeIconColor, t),
    visibleIconColor: Color.lerp(a.visibleIconColor, b.visibleIconColor, t),
    inputFieldBorderColor:
        Color.lerp(a.inputFieldBorderColor, b.inputFieldBorderColor, t),
    errorBorderColor: Color.lerp(a.errorBorderColor, b.errorBorderColor, t),
  );
}