SceneAnimationSpec class Widgets

Declares the playback state of one of a SceneModel's imported animations.

An immutable value: rebuild with different values and the widget applies the differences to the underlying AnimationClip as plain property writes, so weight and speed can be driven by ordinary Flutter animations (a TweenAnimationBuilder cross-fading two clips' weights, for example). Clips for the same name persist across rebuilds; a spec that disappears from SceneModel.animations stops its clip.

A one-shot spec (loop false) whose playing flips from false to true restarts from the beginning; a looping spec resumes.

Annotations

Constructors

SceneAnimationSpec(String name, {bool playing = true, bool loop = true, double weight = 1.0, double speed = 1.0})
const

Properties

hashCode int
The hash code for this object.
no setteroverride
loop bool
Whether the clip wraps at the end instead of pausing.
final
name String
The imported animation's name.
final
playing bool
Whether the clip advances. Pausing keeps the current playback time.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
speed double
Playback rate multiplier (negative plays in reverse).
final
weight double
Blend weight in [0, 1]; overlapping clips are weight-blended and normalized by the engine when the sum exceeds one.
final

Methods

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.
override