Motion class abstract
A motion pattern such as spring physics or duration-based curves.
Motion provides a foundation for creating various types of animation behaviors. Concrete implementations of this class define specific motion patterns like spring physics or duration-based curves.
- Annotations
Constructors
- Motion({Tolerance tolerance = Tolerance.defaultTolerance})
-
A motion pattern such as spring physics or duration-based curves.
const
- Motion.bouncySpring({Duration duration, double extraBounce, bool snapToEnd})
-
A spring animation with a predefined duration and higher amount of bounce.
constfactory
- Motion.cupertino({Duration duration, double bounce, bool snapToEnd})
-
A collection of spring motions that are commonly used in Cupertino apps.
constfactory
- Motion.curved(Duration duration, [Curve curve])
-
A motion based on a fixed duration and curve.
constfactory
- Motion.customSpring(SpringDescription spring)
-
A motion based on spring physics.
constfactory
- Motion.interactiveSpring({Duration duration, double extraBounce, bool snapToEnd})
-
A spring animation with a lower response value,
intended for driving interactive animations.
constfactory
- Motion.linear(Duration duration)
-
Creates a linear motion with a fixed duration.
constfactory
- Motion.none([Duration duration])
-
A motion that holds at the current value for
durationand never reaches its target.constfactory - Motion.smoothSpring({Duration duration, double extraBounce, bool snapToEnd})
-
A smooth spring animation with a predefined duration and no bounce.
constfactory
- Motion.snappySpring({Duration duration, double extraBounce, bool snapToEnd})
-
A spring animation with a predefined duration and small amount of bounce
that feels more snappy.
constfactory
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
- needsSettle → bool
-
Whether this motion needs to settle.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- tolerance → Tolerance
-
The tolerance for this motion.
final
- unboundedWillSettle → bool
-
Whether this motion will settle without bounds.
no setter
Methods
-
createSimulation(
{double start = 0, double end = 1, double velocity = 0}) → Simulation - Creates a simulation for this motion.
-
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.
override