FTypography.lerp constructor

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

Creates a linear interpolation between two FTypographys using the given factor t.

Implementation

factory FTypography.lerp(FTypography a, FTypography b, double t) => FTypography(
  defaultFontFamily: t < 0.5 ? a.defaultFontFamily : b.defaultFontFamily,
  xs: TextStyle.lerp(a.xs, b.xs, t)!,
  sm: TextStyle.lerp(a.sm, b.sm, t)!,
  base: TextStyle.lerp(a.base, b.base, t)!,
  lg: TextStyle.lerp(a.lg, b.lg, t)!,
  xl: TextStyle.lerp(a.xl, b.xl, t)!,
  xl2: TextStyle.lerp(a.xl2, b.xl2, t)!,
  xl3: TextStyle.lerp(a.xl3, b.xl3, t)!,
  xl4: TextStyle.lerp(a.xl4, b.xl4, t)!,
  xl5: TextStyle.lerp(a.xl5, b.xl5, t)!,
  xl6: TextStyle.lerp(a.xl6, b.xl6, t)!,
  xl7: TextStyle.lerp(a.xl7, b.xl7, t)!,
  xl8: TextStyle.lerp(a.xl8, b.xl8, t)!,
);