copyWith method
LavaPainterData
copyWith({
- double? width,
- double? widthTolerance,
- bool? growAndShrink,
- double? growthRate,
- double? growthRateTolerance,
- double? blurLevel,
- int? numBlobs,
- Color? backgroundColor,
- List<
Color> ? colors, - bool? allSameColor,
- bool? fadeBetweenColors,
- bool? changeColorsTogether,
- double? speed,
- double? speedTolerance,
override
Returns a copy of this object with its field values replaced by the ones provided to this method.
Implementation
@override
LavaPainterData copyWith({
double? width,
double? widthTolerance,
bool? growAndShrink,
double? growthRate,
double? growthRateTolerance,
double? blurLevel,
int? numBlobs,
Color? backgroundColor,
List<Color>? colors,
bool? allSameColor,
bool? fadeBetweenColors,
bool? changeColorsTogether,
double? speed,
double? speedTolerance,
}) {
return LavaPainterData(
width: width ?? this.width,
widthTolerance: widthTolerance ?? this.widthTolerance,
growAndShrink: growAndShrink ?? this.growAndShrink,
growthRate: growthRate ?? this.growthRate,
growthRateTolerance: growthRateTolerance ?? this.growthRateTolerance,
blurLevel: blurLevel ?? this.blurLevel,
numBlobs: numBlobs ?? this.numBlobs,
backgroundColor: backgroundColor ?? this.backgroundColor,
colors: colors ?? List<Color>.from(_colors),
allSameColor: allSameColor ?? this.allSameColor,
fadeBetweenColors: fadeBetweenColors ?? this.fadeBetweenColors,
changeColorsTogether: changeColorsTogether ?? this.changeColorsTogether,
speed: speed ?? this.speed,
speedTolerance: speedTolerance ?? this.speedTolerance,
);
}