DoughRecipeData class

Settings which will be applied to the Dough widget at runtime.

Annotations

Constructors

DoughRecipeData({double? viscosity, double? adhesion, double? expansion, bool? usePerspectiveWarp, double? perspectiveWarpDepth, Duration? entryDuration, Curve? entryCurve, Duration? exitDuration, Curve? exitCurve, DraggableDoughPrefs? draggablePrefs})
Creates a recipe. Defaults are implied for any values not specified.
factory
DoughRecipeData.fallback()
Creates the fallback recipe.
factory
DoughRecipeData.raw({required double viscosity, required double adhesion, required double expansion, required bool usePerspectiveWarp, required double perspectiveWarpDepth, required Duration entryDuration, required Curve entryCurve, required Duration exitDuration, required Curve exitCurve, required DraggableDoughPrefs draggablePrefs})
Creates a raw recipe, all values must be specified.
const

Properties

adhesion double
How sticky a Dough widget is. Higher values result in Dough that doesn't move around a lot when its dragged. Lower values result in really "slippery" Dough. A typical value would be something like 12.
final
draggablePrefs DraggableDoughPrefs
Default settings applied to DraggableDough widgets.
final
entryCurve Curve
The curve by which a Dough widget enters a squished state.
final
entryDuration Duration
How long a Dough widget takes to transition into a squished state.
final
exitCurve Curve
The curve by which a Dough widget exits a squished state.
final
exitDuration Duration
How long a Dough widget takes to transition out of a squished state.
final
expansion double
The factor by which a Dough widget expands when activated.
final
hashCode int
The hash code for this object.
no setterinherited
perspectiveWarpDepth double
The depth of the perspective warp. A typical value would be something like 0.015.
final
props List<Object>
The list of properties that will be used to determine whether two instances are equal.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stringify bool
If set to true, the toString method will be overridden to output this instance's props.
no setter
usePerspectiveWarp bool
Whether perspective warping should be used. When enabled, Dough widgets will perform a 3D rotation slightly towards DoughController.delta. This will give the illusion that the dough has mass and make it feel more jiggly.
final
viscosity double
How 'thick' a Dough widget is. Higher values make for harder/less elastic Dough. A typical value would be something like 7000. Lower values like 100 will result in unexpected behaviors.
final

Methods

copyWith({double? viscosity, double? adhesion, double? expansion, bool? usePerspectiveWarp, double? perspectiveWarpDepth, Duration? entryDuration, Curve? entryCurve, Duration? exitDuration, Curve? exitCurve, DraggableDoughPrefs? draggablePrefs}) DoughRecipeData
Copies the current recipe with some new values.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited