AnimatorTransition class

A way from one state to another, taken when every condition holds.

Constructors

AnimatorTransition({required String from, required String to, List<AnimatorCondition> conditions = const [], bool hasExitTime = false, double exitTime = 1.0, int priority = 0, double duration = 0})
A transition from from — anyState for any — to to, taken when every one of conditions holds; no exit time and priority 0 unless given.
const
AnimatorTransition.fromJson(Map<String, dynamic> json)
Reads toJson's shape. A missing from is anyState, a missing to is empty, and entries of conditions that are not maps are skipped.
factory

Properties

conditions → List<AnimatorCondition>
The tests that must all hold. With none it fires on its exit time — or, without one, at once.
final
duration → double
Seconds the old state blends into the new one; 0 cuts. A target that can't blend (a sprite) always cuts. A format 2 feature.
final
exitTime → double
How far through the clip, 0–1. One pass for a looping clip.
final
from → String
The state it leaves, or anyState.
final
hasExitTime → bool
Wait until the playing clip has reached exitTime before leaving. A transition with no conditions and an exit time is "when it finishes".
final
hashCode → int
The hash code for this object.
no setterinherited
isFromAny → bool
Whether it can leave any state (from is anyState). It is never taken into the state the animator is already in.
no setter
priority → int
Among transitions that could fire, the highest goes; ties go to the one listed first.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
to → String
The state it enters. A transition into a state the graph lacks is never taken.
final

Methods

copyWith({String? from, String? to, List<AnimatorCondition>? conditions, bool? hasExitTime, double? exitTime, int? priority, double? duration}) → AnimatorTransition
A copy with the given fields replaced; the conditions list is shared, not copied.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
This transition as a JSON map: from, to and conditions; hasExitTime and exitTime only with an exit time, priority only when not 0.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Constants

anyState → const String
from for a transition that can leave any state.