copyWith method
LightingConfig
copyWith({
- double? radius,
- Color? color,
- bool? withPulse,
- bool? useComponentAngle,
- double? pulseVariation,
- double? pulseSpeed,
- Curve? pulseCurve,
- double? blurBorder,
- LightingType? type,
- Vector2? align,
- LightingMode? mode,
- LightFalloff? falloff,
- double? innerRadius,
- double? intensity,
- BlendMode? additiveBlendMode,
- LightFlicker? flicker,
- bool? castShadows,
Returns a copy with the given fields replaced.
All fields are preserved, including align, mode and falloff.
Implementation
LightingConfig copyWith({
double? radius,
Color? color,
bool? withPulse,
bool? useComponentAngle,
double? pulseVariation,
double? pulseSpeed,
Curve? pulseCurve,
double? blurBorder,
LightingType? type,
Vector2? align,
LightingMode? mode,
LightFalloff? falloff,
double? innerRadius,
double? intensity,
BlendMode? additiveBlendMode,
LightFlicker? flicker,
bool? castShadows,
}) {
return LightingConfig(
radius: radius ?? this.radius,
color: color ?? this.color,
withPulse: withPulse ?? this.withPulse,
useComponentAngle: useComponentAngle ?? this.useComponentAngle,
pulseVariation: pulseVariation ?? this.pulseVariation,
pulseSpeed: pulseSpeed ?? this.pulseSpeed,
pulseCurve: pulseCurve ?? this.pulseCurve,
blurBorder: blurBorder ?? this.blurBorder,
type: type ?? this.type,
align: align ?? this.align,
mode: mode ?? this.mode,
falloff: falloff ?? this.falloff,
innerRadius: innerRadius ?? this.innerRadius,
intensity: intensity ?? this.intensity,
additiveBlendMode: additiveBlendMode ?? this.additiveBlendMode,
flicker: flicker ?? this.flicker,
castShadows: castShadows ?? this.castShadows,
);
}