NomoColors.lerp constructor
NomoColors.lerp(
- NomoColors a,
- NomoColors b,
- double t
Implementation
factory NomoColors.lerp(NomoColors a, NomoColors b, double t) {
return NomoColors(
brightness: t < 0.5 ? a.brightness : b.brightness,
primary: Color.lerp(a.primary, b.primary, t)!,
onPrimary: Color.lerp(a.onPrimary, b.onPrimary, t)!,
primaryContainer: Color.lerp(a.primaryContainer, b.primaryContainer, t)!,
secondary: Color.lerp(a.secondary, b.secondary, t)!,
onSecondary: Color.lerp(a.onSecondary, b.onSecondary, t)!,
secondaryContainer:
Color.lerp(a.secondaryContainer, b.secondaryContainer, t)!,
background1: Color.lerp(a.background1, b.background1, t)!,
background2: Color.lerp(a.background2, b.background2, t)!,
background3: Color.lerp(a.background3, b.background3, t)!,
surface: Color.lerp(a.surface, b.surface, t)!,
error: Color.lerp(a.error, b.error, t)!,
disabled: Color.lerp(a.disabled, b.disabled, t)!,
foreground1: Color.lerp(a.foreground1, b.foreground1, t)!,
foreground2: Color.lerp(a.foreground2, b.foreground2, t)!,
foreground3: Color.lerp(a.foreground3, b.foreground3, t)!,
onDisabled: Color.lerp(a.onDisabled, b.onDisabled, t)!,
);
}