lerp method Null safety

PdfPaginationDialogStyle? lerp(
  1. PdfPaginationDialogStyle? a,
  2. PdfPaginationDialogStyle? b,
  3. double t
)

Linearly interpolate between two styles.

Implementation

static PdfPaginationDialogStyle? lerp(
    PdfPaginationDialogStyle? a, PdfPaginationDialogStyle? b, double t) {
  if (a == null && b == null) {
    return null;
  }
  return PdfPaginationDialogStyle(
      backgroundColor: Color.lerp(a!.backgroundColor, b!.backgroundColor, t),
      headerTextStyle:
          TextStyle.lerp(a.headerTextStyle, b.headerTextStyle, t),
      inputFieldTextStyle:
          TextStyle.lerp(a.inputFieldTextStyle, b.inputFieldTextStyle, t),
      hintTextStyle: TextStyle.lerp(a.hintTextStyle, b.hintTextStyle, t),
      pageInfoTextStyle:
          TextStyle.lerp(a.pageInfoTextStyle, b.pageInfoTextStyle, t),
      validationTextStyle:
          TextStyle.lerp(a.validationTextStyle, b.validationTextStyle, t),
      okTextStyle: TextStyle.lerp(a.okTextStyle, b.okTextStyle, t),
      cancelTextStyle:
          TextStyle.lerp(a.cancelTextStyle, b.cancelTextStyle, t));
}