LabelRef class final
A reference to a Timeline label, plus a signed offset applied to the
label's recorded playhead position.
Timeline.play(at:) accepts a LabelRef so a step can place itself relative
to a named moment: at: 'reveal'.label - 0.2.seconds starts two tenths of a
second before the reveal label. The reference stays symbolic until the
timeline resolves it against its recorded labels at play() time, so it
never reaches the per-frame hot path.
'reveal'.label // the reveal label at its recorded position
'reveal'.label + 0.2.seconds // a fifth of a second after it
'reveal'.label - 0.2.seconds // a fifth of a second before it
- Annotations
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
- name → String
-
The label this reference points at — matched against the timeline's
recorded
label()calls by name.final - offset → Time
-
The signed offset from the label's recorded playhead position; positive
is later, negative is earlier.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator +(
Time delta) → LabelRef -
This reference moved
deltalater — adds to the running offset. -
operator -(
Time delta) → LabelRef -
This reference moved
deltaearlier — subtracts from the running offset. -
operator ==(
Object other) → bool -
The equality operator.
override