FColors.lerp constructor
Creates a linear interpolation between two FColors using the given factor t
.
Implementation
factory FColors.lerp(FColors a, FColors b, double t) => FColors(
brightness: t < 0.5 ? a.brightness : b.brightness,
systemOverlayStyle: t < 0.5 ? a.systemOverlayStyle : b.systemOverlayStyle,
barrier: Color.lerp(a.barrier, b.barrier, t)!,
background: Color.lerp(a.background, b.background, t)!,
foreground: Color.lerp(a.foreground, b.foreground, t)!,
primary: Color.lerp(a.primary, b.primary, t)!,
primaryForeground: Color.lerp(a.primaryForeground, b.primaryForeground, t)!,
secondary: Color.lerp(a.secondary, b.secondary, t)!,
secondaryForeground: Color.lerp(a.secondaryForeground, b.secondaryForeground, t)!,
muted: Color.lerp(a.muted, b.muted, t)!,
mutedForeground: Color.lerp(a.mutedForeground, b.mutedForeground, t)!,
destructive: Color.lerp(a.destructive, b.destructive, t)!,
destructiveForeground: Color.lerp(a.destructiveForeground, b.destructiveForeground, t)!,
error: Color.lerp(a.error, b.error, t)!,
errorForeground: Color.lerp(a.errorForeground, b.errorForeground, t)!,
border: Color.lerp(a.border, b.border, t)!,
hoverLighten: lerpDouble(a.hoverLighten, b.hoverLighten, t)!,
hoverDarken: lerpDouble(a.hoverDarken, b.hoverDarken, t)!,
disabledOpacity: lerpDouble(a.disabledOpacity, b.disabledOpacity, t)!,
);