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.
const
factory
Motion.cupertino({Duration duration, double bounce, bool snapToEnd})
A collection of spring motions that are commonly used in Cupertino apps.
const
factory
Motion.curved(Duration duration, [Curve curve])
A motion based on a fixed duration and curve.
const
factory
Motion.customSpring(SpringDescription spring)
A motion based on spring physics.
const
factory
Motion.interactiveSpring({Duration duration, double extraBounce, bool snapToEnd})
A spring animation with a lower response value, intended for driving interactive animations.
const
factory
Motion.linear(Duration duration)
Creates a linear motion with a fixed duration.
const
factory
Motion.none([Duration duration])
A motion that holds at the current value for duration and never reaches its target.
const
factory
Motion.smoothSpring({Duration duration, double extraBounce, bool snapToEnd})
A smooth spring animation with a predefined duration and no bounce.
const
factory
Motion.snappySpring({Duration duration, double extraBounce, bool snapToEnd})
A spring animation with a predefined duration and small amount of bounce that feels more snappy.
const
factory

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