copyWith method

  1. @override
ThemeExtension<CustomThemeExtension> copyWith({
  1. SmartColor? primary,
  2. SmartColor? secondary,
  3. SmartColor? danger,
  4. SmartColor? warning,
  5. SmartColor? success,
  6. SmartColor? info,
  7. SmartContrastColor? contrast,
  8. SmartTextStyles? textStyles,
  9. SmartColor? neutral,
})
override

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

Implementation

@override
ThemeExtension<CustomThemeExtension> copyWith({
  SmartColor? primary,
  SmartColor? secondary,
  SmartColor? danger,
  SmartColor? warning,
  SmartColor? success,
  SmartColor? info,
  SmartContrastColor? contrast,
  SmartTextStyles? textStyles,
  SmartColor? neutral,
}) {
  return CustomThemeExtension(
    contrast: contrast ?? this.contrast,
    neutral: neutral ?? this.neutral,
    primary: primary ?? this.primary,
    secondary: secondary ?? this.secondary,
    danger: danger ?? this.danger,
    warning: warning ?? this.warning,
    success: success ?? this.success,
    info: info ?? this.info,
    textStyles: textStyles ?? this.textStyles,
  );
}