copyWith method
- Brightness? brightness,
- ZetaContrast? contrast,
- ZetaColorSwatch? primary,
- ZetaColorSwatch? secondary,
- ZetaColorSwatch? error,
- ZetaColorSwatch? cool,
- ZetaColorSwatch? warm,
- Color? white,
- Color? black,
- Color? surfacePrimary,
- Color? surfaceSecondary,
- Color? surfaceTertiary,
- @Deprecated('This color has been deprecated as of v0.10.0') Color? link,
- @Deprecated('This color has been deprecated as of v0.10.0') Color? linkVisited,
- @Deprecated('This color has been deprecated as of v0.10.0') Color? shadow,
Applies new property values to ZetaColors and returns a new copy.
Each property defaults to the previous value if not specified.
Implementation
ZetaColors copyWith({
Brightness? brightness,
ZetaContrast? contrast,
ZetaColorSwatch? primary,
ZetaColorSwatch? secondary,
ZetaColorSwatch? error,
ZetaColorSwatch? cool,
ZetaColorSwatch? warm,
Color? white,
Color? black,
Color? surfacePrimary,
Color? surfaceSecondary,
Color? surfaceTertiary,
@Deprecated('This color has been deprecated as of v0.10.0') Color? link,
@Deprecated('This color has been deprecated as of v0.10.0') Color? linkVisited,
@Deprecated('This color has been deprecated as of v0.10.0') Color? shadow,
}) {
return ZetaColors(
white: white ?? this.white,
black: black ?? this.black,
brightness: brightness ?? this.brightness,
contrast: contrast ?? this.contrast,
primary: primary ?? this.primary,
secondary: secondary ?? this.secondary,
error: error ?? this.error,
cool: cool ?? this.cool,
warm: warm ?? this.warm,
surfacePrimary: surfacePrimary ?? this.surfacePrimary,
surfaceSecondary: surfaceSecondary ?? this.surfaceSecondary,
surfaceTertiary: surfaceTertiary ?? this.surfaceTertiary,
adjust: (brightness != null && brightness != this.brightness) || (contrast != null && contrast != this.contrast),
);
}