copyWith method

  1. @override
KiteColors copyWith({
  1. Color? primary,
  2. Color? onPrimary,
  3. Color? secondary,
  4. Color? onSecondary,
  5. Color? background,
  6. Color? card,
  7. Color? muted,
  8. Color? inputFill,
  9. Color? border,
  10. Color? textPrimary,
  11. Color? textSecondary,
  12. Color? textDisabled,
  13. Color? icon,
  14. Color? success,
  15. Color? warning,
  16. Color? error,
  17. Color? info,
})
override

Creates a copy of this theme extension with the given fields replaced by the non-null parameter values.

Implementation

@override
KiteColors copyWith({
  Color? primary,
  Color? onPrimary,
  Color? secondary,
  Color? onSecondary,
  Color? background,
  Color? card,
  Color? muted,
  Color? inputFill,
  Color? border,
  Color? textPrimary,
  Color? textSecondary,
  Color? textDisabled,
  Color? icon,
  Color? success,
  Color? warning,
  Color? error,
  Color? info,
}) {
  return KiteColors(
    primary: primary ?? this.primary,
    onPrimary: onPrimary ?? this.onPrimary,
    secondary: secondary ?? this.secondary,
    onSecondary: onSecondary ?? this.onSecondary,
    background: background ?? this.background,
    card: card ?? this.card,
    muted: muted ?? this.muted,
    inputFill: inputFill ?? this.inputFill,
    border: border ?? this.border,
    textPrimary: textPrimary ?? this.textPrimary,
    textSecondary: textSecondary ?? this.textSecondary,
    textDisabled: textDisabled ?? this.textDisabled,
    icon: icon ?? this.icon,
    success: success ?? this.success,
    warning: warning ?? this.warning,
    error: error ?? this.error,
    info: info ?? this.info,
  );
}