copyWith method

FlexSchemeColor copyWith({
  1. Color? primary,
  2. Color? primaryContainer,
  3. Color? primaryLightRef,
  4. Color? secondary,
  5. Color? secondaryContainer,
  6. Color? secondaryLightRef,
  7. Color? tertiary,
  8. Color? tertiaryContainer,
  9. Color? tertiaryLightRef,
  10. Color? appBarColor,
  11. Color? error,
  12. Color? errorContainer,
  13. bool? swapOnMaterial3,
})

Copy the object with one or more provided properties changed.

Implementation

FlexSchemeColor copyWith({
  final Color? primary,
  final Color? primaryContainer,
  final Color? primaryLightRef,
  final Color? secondary,
  final Color? secondaryContainer,
  final Color? secondaryLightRef,
  final Color? tertiary,
  final Color? tertiaryContainer,
  final Color? tertiaryLightRef,
  final Color? appBarColor,
  final Color? error,
  final Color? errorContainer,
  final bool? swapOnMaterial3,
}) {
  return FlexSchemeColor(
    primary: primary ?? this.primary,
    primaryContainer: primaryContainer ?? this.primaryContainer,
    primaryLightRef: primaryLightRef ?? this.primaryLightRef,
    secondary: secondary ?? this.secondary,
    secondaryContainer: secondaryContainer ?? this.secondaryContainer,
    secondaryLightRef: secondaryLightRef ?? this.secondaryLightRef,
    tertiary: tertiary ?? this.tertiary,
    tertiaryContainer: tertiaryContainer ?? this.tertiaryContainer,
    tertiaryLightRef: tertiaryLightRef ?? this.tertiaryLightRef,
    appBarColor: appBarColor ?? this.appBarColor,
    error: error ?? this.error,
    errorContainer: errorContainer ?? this.errorContainer,
    swapOnMaterial3: swapOnMaterial3 ?? this.swapOnMaterial3,
  );
}