CurvedMotion class
A motion based on a fixed duration and curve.
CurvedMotion implements a motion that follows a specific Curve over a fixed Duration. This is the most common type of animation in Flutter, similar to what is used with AnimationController.animateTo.
This motion always completes in the specified duration and does not need to settle.
Constructors
- CurvedMotion(Duration duration, [Curve curve = Curves.linear])
-
Creates a motion with a fixed duration and curve.
const
Properties
- curve → Curve
-
The curve that defines the rate of change of the motion over time.
final
- duration → Duration
-
The total duration of the motion.
final
- hashCode → int
-
Returns a hash code for this object.
no setteroverride
- needsSettle → bool
-
Whether this motion needs to settle.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- tolerance → Tolerance
-
The tolerance for this motion.
finalinherited
- unboundedWillSettle → bool
-
Whether this motion will settle without bounds.
no setteroverride
Methods
-
copyWith(
{Duration? duration, Curve? curve}) → CurvedMotion - Creates a new CurvedMotion with the given parameters.
-
createSimulation(
{double start = 0, double end = 1, double velocity = 0}) → Simulation -
Creates a simulation for this motion.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
Returns a string representation of this object.
override
-
withCurve(
Curve curve) → CurvedMotion -
Applies
curveto the current duration.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override