TimelineTween<T> class

Animatable that handles complex animations which handles multiple properties or scenes.

You can specify a default curve for the tween by setting curve.

Example: (using supercharged)

enum Prop { width, height, color }

var timeline = TimelineTween<Prop>();

timeline
    .addScene(begin: 0.seconds, duration: 1.seconds)
    .animate(Prop.width, tween: 100.0.tweenTo(200.0))
    .animate(Prop.height, tween: 50.0.tweenTo(100.0));

timeline
    .addScene(begin: 1.2.seconds, end: 2.seconds)
    .animate(Prop.color, tween: Colors.black.tweenTo(Colors.black));
Inheritance

Constructors

TimelineTween({Curve curve = Curves.linear})

Properties

curve Curve
final
duration Duration
Returns the total Duration based on the specified scenes.
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addScene({Duration? begin, Duration? duration, Duration? end, Curve? curve}) TimelineScene<T>
Adds a new scene to the timeline. A scene is specified with a time span. The time span can be set by providing either
animate(Animation<double> parent) Animation<TimelineValue<T>>
Returns a new Animation that is driven by the given animation but that takes on values determined by this object.
inherited
chain(Animatable<double> parent) Animatable<TimelineValue<T>>
Returns a new Animatable whose value is determined by first evaluating the given parent and then evaluating this object at the result.
inherited
evaluate(Animation<double> animation) TimelineValue<T>
The current value of this object for the given Animation.
inherited
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) TimelineValue<T>
Computes the tween
override

Operators

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