copyWith method

  1. @override
FUIPalette copyWith({
  1. Color? primary,
  2. Color? primaryHover,
  3. Color? primaryPressed,
  4. Color? primarySoft,
  5. Color? primarySubtle,
  6. Color? background,
  7. Color? backgroundAlt,
  8. Color? surface,
  9. Color? surfaceAlt,
  10. Color? surfacePressed,
  11. Color? border,
  12. Color? borderStrong,
  13. Color? textPrimary,
  14. Color? textSecondary,
  15. Color? textTertiary,
  16. Color? textDisabled,
  17. Color? textInverse,
  18. Color? success,
  19. Color? successSoft,
  20. Color? warning,
  21. Color? warningSoft,
  22. Color? danger,
  23. Color? dangerHover,
  24. Color? dangerSoft,
  25. Color? info,
  26. Color? infoSoft,
})
override

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

Implementation

@override
FUIPalette copyWith({
  Color? primary,
  Color? primaryHover,
  Color? primaryPressed,
  Color? primarySoft,
  Color? primarySubtle,
  Color? background,
  Color? backgroundAlt,
  Color? surface,
  Color? surfaceAlt,
  Color? surfacePressed,
  Color? border,
  Color? borderStrong,
  Color? textPrimary,
  Color? textSecondary,
  Color? textTertiary,
  Color? textDisabled,
  Color? textInverse,
  Color? success,
  Color? successSoft,
  Color? warning,
  Color? warningSoft,
  Color? danger,
  Color? dangerHover,
  Color? dangerSoft,
  Color? info,
  Color? infoSoft,
}) {
  return FUIPalette(
    primary: primary ?? this.primary,
    primaryHover: primaryHover ?? this.primaryHover,
    primaryPressed: primaryPressed ?? this.primaryPressed,
    primarySoft: primarySoft ?? this.primarySoft,
    primarySubtle: primarySubtle ?? this.primarySubtle,
    background: background ?? this.background,
    backgroundAlt: backgroundAlt ?? this.backgroundAlt,
    surface: surface ?? this.surface,
    surfaceAlt: surfaceAlt ?? this.surfaceAlt,
    surfacePressed: surfacePressed ?? this.surfacePressed,
    border: border ?? this.border,
    borderStrong: borderStrong ?? this.borderStrong,
    textPrimary: textPrimary ?? this.textPrimary,
    textSecondary: textSecondary ?? this.textSecondary,
    textTertiary: textTertiary ?? this.textTertiary,
    textDisabled: textDisabled ?? this.textDisabled,
    textInverse: textInverse ?? this.textInverse,
    success: success ?? this.success,
    successSoft: successSoft ?? this.successSoft,
    warning: warning ?? this.warning,
    warningSoft: warningSoft ?? this.warningSoft,
    danger: danger ?? this.danger,
    dangerHover: dangerHover ?? this.dangerHover,
    dangerSoft: dangerSoft ?? this.dangerSoft,
    info: info ?? this.info,
    infoSoft: infoSoft ?? this.infoSoft,
  );
}