DraggableOverlayDoughTransformer class

Transforms Dough.child widgets such that they stretch towards their target with adhesion applied. Additionally this transformer allows you to apply offset to the child widget while being dragged to give the illusion that the draggable widget is "resisting" being dragged until DoughController.stop is called.

Inheritance

Constructors

DraggableOverlayDoughTransformer({required bool applyDelta, required bool snapToTargetOnStop})
Creates a DraggableOverlayDoughTransformer.

Properties

applyDelta bool
Whether the controller's delta should be applied to the widget. This will offset the widget being dragged by DoughTransformerContext.delta.
final
axis Axis?
The axis on which to constrain any stretching.
no setterinherited
controller DoughController
The controller for the associated Dough widget.
no setterinherited
delta → Vector2
The delta of the dough squish. This value is equivalent to DoughController.delta, but is a vector instead of an offset.
no setterinherited
deltaAngle double
The full-circle delta angle of the delta value, relative to the Dough widgets up direction. This value ranges between 0 radians and 2PI radians.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
origin → Vector2
The origin of the dough squish. This value is equivalent to DoughController.origin, but is a vector instead of an offset.
no setterinherited
rawT double
The unscaled animation time clamped between 0 and 1.
no setterinherited
recipe DoughRecipeData
The contexual recipe applied to the associated Dough widget.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
snapToTargetOnStop bool
If applyDelta is true, this determines whether the widget should snap towards the target when DoughController.stop is called.
final
t double
The scaled animation time, based on rawT, which has been transformed by the DoughRecipeData.entryCurve or DoughRecipeData.exitCurve.
no setterinherited
target → Vector2
The target of the dough squish. This value is equivalent to DoughController.target, but is a vector instead of an offset.
no setterinherited

Methods

createDoughMatrix() Matrix4
Creates the Matrix4 which will be used to transform the Dough.child widget.
inherited
createExpansionMatrix() Matrix4
See DoughTransformations.expansion.
inherited
createPerspectiveWarpMatrix() Matrix4
See DoughTransformations.perspectiveWarp.
inherited
createSquishDeformationMatrix() Matrix4
See DoughTransformations.squishDeformation.
inherited
createViscositySkewMatrix() Matrix4
See DoughTransformations.viscositySkew.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onPostTransform(DoughTransformerContext context) → void
A callback raised after a transform has been invoked.
inherited
onPreTransform(DoughTransformerContext context) → void
A callback raised after a transform has been invoked.
inherited
toString() String
A string representation of this object.
inherited
transform(DoughTransformerContext context) Matrix4
Creates the Matrix4 which will be used to transform the Dough.child widget.
override

Operators

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