StillKeyframe<T> class
A keyframe that holds a constant value without animating.
This keyframe maintains a static value for its duration. If value is null,
it uses the ending value from the previous keyframe.
Type Parameters
T- The type of value to hold.
Overview
Use StillKeyframe to create pauses or delays in timeline animations where the value remains constant for a period of time.
Example
final timeline = TimelineAnimation<double>(
keyframes: [
AbsoluteKeyframe(Duration(milliseconds: 100), 0.0, 1.0),
StillKeyframe(Duration(milliseconds: 200)), // Hold at 1.0 for 200ms
RelativeKeyframe(Duration(milliseconds: 100), 0.0), // Back to 0.0
],
);
- Implemented types
-
- Keyframe<
T>
- Keyframe<
Constructors
- StillKeyframe(Duration duration, [T? value])
-
Creates a still keyframe that holds a value.
const
Properties
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