Sprung class

Inheritance

Constructors

Sprung([double damping = 20])
A Curve that uses the Flutter Physics engine to drive realistic animations.
factory
Sprung.custom({double damping = 20, double stiffness = 180, double mass = 1.0, double velocity = 0.0})
Provides a critically damped spring by default, with an easily overrideable damping, stiffness and mass value.
Sprung.scroll({double damping = 1.0, double stiffness = 180, double mass = 1.0, double velocity = 0.0})

Properties

flipped Curve
Returns a new curve that is the reversed inversion of this one.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
transform(double t) double
Returns the position from the simulator and corrects the final output x(1.0) for tight tolerances.
override
transformInternal(double t) double
Returns the value of the curve at point t.
inherited

Operators

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

Static Properties

criticallyDamped Curve
Provides a critically damped spring, which overshoots once very slightly.
no setter
overDamped Curve
Provides an over damped spring, which smoothly glides into place.
no setter
underDamped Curve
Provides an under damped spring, which wobbles loosely at the end.
no setter