AnimationTrack class final
One tween a NodeAnimation drives: a property at a binding path of a node, or a variable.
The value at the controller's value v (after the animation's curve):
u is v inside interval (Interval(begin, end)), eased by curve
(CurveTween); then waves added to from, else the keyframes
(TweenSequence), else Tween(begin: from, end: to) at u. A missing
from or to is the property's own value (an entrance gives only
from), or blend's identity when the track adds or multiplies.
Numbers interpolate and, as Tween<double> does, carry on past the ends
on a curve that overshoots (elasticOut); colors interpolate; any other
value switches at the end.
On a replacing track a wave's amplitude is a share of the way from
from to to (the property's own value when to is omitted):
{"from": 0, "wave": [{}]} swings a property between its own value and
as far the other way, once a run (a pendulum). On an adding or
multiplying track it is in the property's own units.
- Annotations
-
- @immutable
Constructors
-
AnimationTrack({String id = '', String path = '', String node = '', String variable = '', Object? from, Object? to, List<
Keyframe> keyframes = const [], List<Wave> wave = const [], List<double> interval = const [0, 1], AnimationCurve curve = AnimationCurve.linear, TrackBlend blend = TrackBlend.replace, KeyframeInterpolation interpolation = KeyframeInterpolation.linear}) -
const
Properties
- blend → TrackBlend
-
final
- curve → AnimationCurve
-
final
- from → Object?
-
Tween(begin:, end:): numbers, colors, or${...}expressions read when a play starts.final - hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
Stable within its animation, so an edit can address it
(
animations.enter.tracks.fade.from). Optional.final - interpolation → KeyframeInterpolation
-
How keyframes are joined.
final
-
interval
→ List<
double> -
Interval(begin, end): the part of the run this track plays in ([begin]alone ends at 1).final -
keyframes
→ List<
Keyframe> -
final
- node → String
-
The target node's id or key; empty: the node the animation is on.
final
- path → String
-
A binding path (BindPaths):
motion.rotate,opacity,decoration.fills[0].color,layout.width,props.value.final -
props
→ List<
Object?> -
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- span → (double, double)
-
interval's begin and end, kept in order inside 0–1.
no setter
- to → Object?
-
Tween(begin:, end:): numbers, colors, or${...}expressions read when a play starts.final - variable → String
-
Instead of path: a number variable the value is written to.
final
-
wave
→ List<
Wave> -
final
Methods
-
local(
double v) → double -
u: the controller's valuevinside interval, eased by curve. -
monotoneAt(
double u, Object? start, Object? stop) → Object? -
The number keyframes keyframes give through
start(at 0) andstop(at 1) atu, on one monotone cubic (it never overshoots a keyframe); a keyframe at 0 or 1 gives that end.startorstopthat isn't a number: sequenceAt. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
sequenceAt(
double u, Object? start, Object? stop, {bool text = false}) → Object? -
TweenSequencethrough keyframes fromstartat 0 tostopat 1; a keyframe at 0 or 1 gives that end. -
toJson(
) → Json -
toString(
) → String -
A string representation of this object.
inherited
-
valueAt(
double v, {Object? own, Object? begin, Object? end, bool text = false}) → Object? -
The track's value at controller value
v, withownthe property's value, andbegin/endstanding in for from/to (resolved expressions).text: the value is a text's (a number in it counts, lerpValue).
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
fromJson(
Object? json) → AnimationTrack? -
lerpValue(
Object? a, Object? b, double t, {bool text = false}) → Object? -
atobatt: numbers interpolate, past the ends too whentovershoots (Tween<double>); colors interpolate within them (ColorTween); anything else switches at the end. -
monotoneCubic(
List< (double, double)> points, double t) → double -
The monotone cubic (Fritsch–Carlson) through
points(times 0–1 in order, the first at 0 and the last at 1) att.