MotionTween<T> class

A motion that tweens a property between two values, optionally using an animation curve. This is one of the most common building blocks when creating motions. The tween class can be used to animate properties of the type Point, Size, Rect, double, or Color.

Inheritance

Constructors

MotionTween({required SetterCallback<T> setter, required T start, required T end, required double duration, Curve? curve})
Creates a new tween motion. The setter will be called to update the animated property from start to end over the duration time in seconds. Optionally an animation curve can be passed in for easing the animation.

Properties

curve Curve?
The animation curve used to ease the animation.
getter/setter pairinherited
duration double
The total time it will take to complete the motion, in seconds.
no setterinherited
end → T
The end value of the animation.
final
hashCode int
The hash code for this object.
no setterinherited
isFinished bool
Returns true if the Motion has completed.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
setter SetterCallback<T>
The setter method used to set the property being animated.
final
start → T
The start value of the animation.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
step(double dt) → void
Moves to the next time step in an motion, dt is the delta time since the last time step in seconds. Typically this method is called from the MotionController.
inherited
toString() String
A string representation of this object.
inherited
update(double t) → void
Sets the motion to a specific point in time. The t value that is passed in is a normalized value 0.0 to 1.0 of the duration of the motion. Every motion will always recieve a callback with the end time point (1.0), unless it is cancelled.
override

Operators

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