copyWith method Null safety
- {Color? sourceGold,
- Color? gold,
- Color? onGold,
- Color? goldContainer,
- Color? onGoldContainer,
- Color? sourceVanilla,
- Color? vanilla,
- Color? onVanilla,
- Color? vanillaContainer,
- Color? onVanillaContainer,
- Color? sourceMauve,
- Color? mauve,
- Color? onMauve,
- Color? mauveContainer,
- Color? onMauveContainer}
override
Creates a copy of this theme extension with the given fields replaced by the non-null parameter values.
Implementation
@override
CustomColors copyWith({
Color? sourceGold,
Color? gold,
Color? onGold,
Color? goldContainer,
Color? onGoldContainer,
Color? sourceVanilla,
Color? vanilla,
Color? onVanilla,
Color? vanillaContainer,
Color? onVanillaContainer,
Color? sourceMauve,
Color? mauve,
Color? onMauve,
Color? mauveContainer,
Color? onMauveContainer,
}) {
return CustomColors(
sourceGold: sourceGold ?? this.sourceGold,
gold: gold ?? this.gold,
onGold: onGold ?? this.onGold,
goldContainer: goldContainer ?? this.goldContainer,
onGoldContainer: onGoldContainer ?? this.onGoldContainer,
sourceVanilla: sourceVanilla ?? this.sourceVanilla,
vanilla: vanilla ?? this.vanilla,
onVanilla: onVanilla ?? this.onVanilla,
vanillaContainer: vanillaContainer ?? this.vanillaContainer,
onVanillaContainer: onVanillaContainer ?? this.onVanillaContainer,
sourceMauve: sourceMauve ?? this.sourceMauve,
mauve: mauve ?? this.mauve,
onMauve: onMauve ?? this.onMauve,
mauveContainer: mauveContainer ?? this.mauveContainer,
onMauveContainer: onMauveContainer ?? this.onMauveContainer,
);
}