copyWith method

ShadColorScheme copyWith({
  1. Color? background,
  2. Color? foreground,
  3. Color? card,
  4. Color? cardForeground,
  5. Color? popover,
  6. Color? popoverForeground,
  7. Color? primary,
  8. Color? primaryForeground,
  9. Color? secondary,
  10. Color? secondaryForeground,
  11. Color? muted,
  12. Color? mutedForeground,
  13. Color? accent,
  14. Color? accentForeground,
  15. Color? destructive,
  16. Color? destructiveForeground,
  17. Color? border,
  18. Color? input,
  19. Color? ring,
  20. Color? selection,
  21. Map<String, Color>? custom,
})

Creates a copy of this ShadColorScheme but with the given fields replaced with the new values.

Implementation

ShadColorScheme copyWith({
  Color? background,
  Color? foreground,
  Color? card,
  Color? cardForeground,
  Color? popover,
  Color? popoverForeground,
  Color? primary,
  Color? primaryForeground,
  Color? secondary,
  Color? secondaryForeground,
  Color? muted,
  Color? mutedForeground,
  Color? accent,
  Color? accentForeground,
  Color? destructive,
  Color? destructiveForeground,
  Color? border,
  Color? input,
  Color? ring,
  Color? selection,
  Map<String, Color>? custom,
}) {
  return ShadColorScheme(
    background: background ?? this.background,
    foreground: foreground ?? this.foreground,
    card: card ?? this.card,
    cardForeground: cardForeground ?? this.cardForeground,
    popover: popover ?? this.popover,
    popoverForeground: popoverForeground ?? this.popoverForeground,
    primary: primary ?? this.primary,
    primaryForeground: primaryForeground ?? this.primaryForeground,
    secondary: secondary ?? this.secondary,
    secondaryForeground: secondaryForeground ?? this.secondaryForeground,
    muted: muted ?? this.muted,
    mutedForeground: mutedForeground ?? this.mutedForeground,
    accent: accent ?? this.accent,
    accentForeground: accentForeground ?? this.accentForeground,
    destructive: destructive ?? this.destructive,
    destructiveForeground:
        destructiveForeground ?? this.destructiveForeground,
    border: border ?? this.border,
    input: input ?? this.input,
    ring: ring ?? this.ring,
    selection: selection ?? this.selection,
    custom: custom ?? this.custom,
  );
}