copyWith method
ThemeExtension<CustomThemeExtension>
copyWith({
- SmartColor? primary,
- SmartColor? secondary,
- SmartColor? danger,
- SmartColor? warning,
- SmartColor? success,
- SmartColor? info,
- SmartContrastColor? contrast,
- SmartTextStyles? textStyles,
- 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,
);
}