copyWith method

  1. @override
LavaPainterData copyWith({
  1. double? width,
  2. double? widthTolerance,
  3. bool? growAndShrink,
  4. double? growthRate,
  5. double? growthRateTolerance,
  6. double? blurLevel,
  7. int? numBlobs,
  8. Color? backgroundColor,
  9. List<Color>? colors,
  10. bool? allSameColor,
  11. bool? fadeBetweenColors,
  12. bool? changeColorsTogether,
  13. double? speed,
  14. 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,
  );
}