DoughRecipeData constructor

DoughRecipeData({
  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,
})

Creates a recipe. Defaults are implied for any values not specified.

Implementation

factory DoughRecipeData({
  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 ?? 7000,
    adhesion: adhesion ?? 12,
    expansion: expansion ?? 1,
    usePerspectiveWarp: usePerspectiveWarp ?? false,
    perspectiveWarpDepth: perspectiveWarpDepth ?? 0.015,
    entryDuration: entryDuration ?? const Duration(milliseconds: 20),
    entryCurve: entryCurve ?? Curves.easeInOut,
    exitDuration: exitDuration ?? const Duration(milliseconds: 500),
    exitCurve: exitCurve ?? Curves.elasticIn,
    draggablePrefs: draggablePrefs ?? DraggableDoughPrefs.fallback(),
  );
}