FTypography.lerp constructor
FTypography.lerp(
- FTypography a,
- FTypography b,
- double t
Creates a linear interpolation between two FTypographys using the given factor t.
Implementation
factory FTypography.lerp(FTypography a, FTypography b, double t) => .new(
fontFamily: t < 0.5 ? a.fontFamily : b.fontFamily,
xs3: .lerp(a.xs3, b.xs3, t)!,
xs2: .lerp(a.xs2, b.xs2, t)!,
xs: .lerp(a.xs, b.xs, t)!,
sm: .lerp(a.sm, b.sm, t)!,
md: .lerp(a.md, b.md, t)!,
lg: .lerp(a.lg, b.lg, t)!,
xl: .lerp(a.xl, b.xl, t)!,
xl2: .lerp(a.xl2, b.xl2, t)!,
xl3: .lerp(a.xl3, b.xl3, t)!,
xl4: .lerp(a.xl4, b.xl4, t)!,
xl5: .lerp(a.xl5, b.xl5, t)!,
xl6: .lerp(a.xl6, b.xl6, t)!,
xl7: .lerp(a.xl7, b.xl7, t)!,
xl8: .lerp(a.xl8, b.xl8, t)!,
);