copyWith method

Lava copyWith({
  1. double? width,
  2. double? widthTolerance,
  3. bool? growAndShrink,
  4. double? growthRate,
  5. double? growthRateTolerance,
  6. double? blurLevel,
  7. List<Color>? colors,
  8. bool? allSameColor,
  9. bool? fadeBetweenColors,
  10. bool? changeColorsTogether,
  11. double? speed,
  12. double? speedTolerance,
})

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,
  );
}