AbsoluteKeyframe<T> class
A keyframe that animates between explicit start and end values.
This keyframe interpolates from a specified from value to a to value over its duration, independent of previous keyframes.
Type Parameters
T- The type of value to animate.
Overview
Use AbsoluteKeyframe when you want complete control over both the start and end values of a keyframe, regardless of previous animation state.
Example
// Animate from 0.0 to 1.0 over 200ms
final keyframe = AbsoluteKeyframe<double>(
Duration(milliseconds: 200),
0.0,
1.0,
);
- Implemented types
-
- Keyframe<
T>
- Keyframe<
Constructors
- AbsoluteKeyframe(Duration duration, T from, T to)
-
Creates an absolute keyframe with explicit start and end values.
const
Properties
- duration → Duration
-
The duration of this keyframe.
final
- from → T
-
The starting value of the animation.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- to → T
-
The ending value of the animation.
final
Methods
-
compute(
TimelineAnimation< T> timeline, int index, double t) → T -
Computes the value for this keyframe at the given progress.
override
-
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.
inherited