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

Constructors

StillKeyframe(Duration duration, [T? value])
Creates a still keyframe that holds a value.
const

Properties

duration Duration
The duration of this keyframe.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value → T?
The value to hold, or null to use the previous keyframe's end value.
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