copyWith method
Returns a copy of this object with its field values replaced by the ones provided to this method.
Special note: The colors list is not copied. It is passed by reference.
Implementation
Lava copyWith({
double? width,
double? widthTolerance,
bool? growAndShrink,
double? growthRate,
double? growthRateTolerance,
double? blurLevel,
List<Color>? colors,
bool? allSameColor,
bool? fadeBetweenColors,
bool? changeColorsTogether,
double? speed,
double? speedTolerance,
}) {
return Lava(
width: width ?? this.width,
widthTolerance: widthTolerance ?? this.widthTolerance,
growAndShrink: growAndShrink ?? this.growAndShrink,
growthRate: growthRate ?? this.growthRate,
growthRateTolerance: growthRateTolerance ?? this.growthRateTolerance,
blurLevel: blurLevel ?? this.blurLevel,
colors: colors ?? this.colors,
allSameColor: allSameColor ?? this.allSameColor,
fadeBetweenColors: fadeBetweenColors ?? this.fadeBetweenColors,
changeColorsTogether: changeColorsTogether ?? this.changeColorsTogether,
speed: speed ?? this.speed,
speedTolerance: speedTolerance ?? this.speedTolerance,
);
}