copyWith method

DoughRecipeData copyWith({
  1. double? viscosity,
  2. double? adhesion,
  3. double? expansion,
  4. bool? usePerspectiveWarp,
  5. double? perspectiveWarpDepth,
  6. Duration? entryDuration,
  7. Curve? entryCurve,
  8. Duration? exitDuration,
  9. Curve? exitCurve,
  10. DraggableDoughPrefs? draggablePrefs,
})

Copies the current recipe with some new values.

Implementation

DoughRecipeData copyWith({
  double? viscosity,
  double? adhesion,
  double? expansion,
  bool? usePerspectiveWarp,
  double? perspectiveWarpDepth,
  Duration? entryDuration,
  Curve? entryCurve,
  Duration? exitDuration,
  Curve? exitCurve,
  DraggableDoughPrefs? draggablePrefs,
}) {
  return DoughRecipeData.raw(
    viscosity: viscosity ?? this.viscosity,
    adhesion: adhesion ?? this.adhesion,
    expansion: expansion ?? this.expansion,
    usePerspectiveWarp: usePerspectiveWarp ?? this.usePerspectiveWarp,
    perspectiveWarpDepth: perspectiveWarpDepth ?? this.perspectiveWarpDepth,
    entryDuration: entryDuration ?? this.entryDuration,
    entryCurve: entryCurve ?? this.entryCurve,
    exitDuration: exitDuration ?? this.exitDuration,
    exitCurve: exitCurve ?? this.exitCurve,
    draggablePrefs: draggablePrefs ?? this.draggablePrefs,
  );
}