TimelineAnimatable<T> class

An Animatable wrapper for TimelineAnimation with explicit duration.

This class adapts a TimelineAnimation to work with a specific total duration, scaling the animation to fit within that time frame.

Type Parameters

  • T - The type of value being animated.

Overview

TimelineAnimatable is typically created via TimelineAnimation.drive or TimelineAnimation.withTotalDuration to bind a timeline to a controller.

Example

final controller = AnimationController(
  vsync: this,
  duration: Duration(seconds: 2),
);
final animatable = timeline.drive(controller);
Inheritance

Constructors

TimelineAnimatable(Duration duration, TimelineAnimation<T> animation)
Creates a timeline animatable with the specified duration.

Properties

animation TimelineAnimation<T>
The underlying timeline animation.
final
duration Duration
The total duration for this animatable.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

animate(Animation<double> parent) Animation<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<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) → 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) → T
Returns the value of the object at point t.
override

Operators

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