SquashStretch class
Non-uniform "squash" wrapper (IDEA-08) — unlike PressableScale's
uniform scale-down, this squishes horizontally (scaleX up, scaleY down)
on tap-down, then a real SpringSimulation (not a fixed Curve) bounces
it back to (1.0, 1.0) on release, carrying over whatever velocity the
spring already had (so a quick re-tap doesn't reset to a dead stop).
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- SquashStretch
Constructors
- SquashStretch({Key? key, required Widget child, VoidCallback? onTap, double stretchScale = 1.15, double squashScale = 0.85, double stiffness = 400, double damping = 20, double mass = 1})
-
const
Properties
- child → Widget
-
final
- damping → double
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- mass → double
-
final
- onTap → VoidCallback?
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- squashScale → double
-
scaleY at maximum squash (tap-down).
final
- stiffness → double
-
final
- stretchScale → double
-
scaleX at maximum squash (tap-down).
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< SquashStretch> -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited