StateTransition<T> class

Represents a transition from one State to another.

Contains:

  • priority: Higher priority transitions are evaluated first (default 1).
  • from: The originating state. Defaults to AnyState, which matches any state.
  • to: The target state (required).
  • guard: A function that returns true when the transition can be triggered (required).

Constructors

StateTransition({int priority = 1, State<T> from = const AnyState(), required State<T> to, required Guard<T> guard})
Creates a StateTransition.

Properties

from → State<T>
The state from which this transition originates.
final
guard → Guard<T>
The guard function that decides if this transition should trigger.
final
hashCode → int
The hash code for this object.
no setterinherited
priority → int
The priority of this transition, higher values are checked before lower.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
to → State<T>
The state to transition to.
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.
inherited