Keyframes<T> class
sealed
Base abstraction for keyframe sequences.
Provides two variants for specifying keyframe sequences:
- Keyframes(): Uses explicit CueMotion objects between frames
- Keyframes.fractional(): Uses normalized positions with a total duration
Both variants can be reversed and mapped to transform values.
Build readable keyframe sequences using the .key() shorthand constructors:
// Motion-based keyframes — motion is required at the Keyframes level;
// per-frame motion is an optional override.
Keyframes([
.key(100.0),
.key(200.0, motion: Spring.bouncy()), // optional per-frame override
], motion: Spring.smooth())
// Fractional keyframes
Keyframes.fractional([
.key(100.0, at: 0.0),
.key(200.0, at: 0.5),
.key(150.0, at: 1.0),
], duration: Duration(seconds: 1))
- Implementers
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- lastTarget → T
-
The final target value in the keyframe sequence.
no setter
-
reversed
→ Keyframes<
T> -
The keyframe sequence reversed.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
values
→ List<
T> -
All target values in the keyframe sequence.
no setter
Methods
-
mapValues<
E> (E transform(T value)) → Keyframes< E> - Maps each value in the keyframes to a new type.
-
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