NonEventTransition<T> class

A transition based on time or the condition field.

It's easiest to create one of these using one of these using the Transition factory method.

Note that transitions, like states, are immutable once created.

Inheritance

Constructors

NonEventTransition({Iterable<String> targets = const [], Duration? after, Condition<T>? condition, String? description, dynamic type = TransitionType.externalTransition, Action<T>? action})
NonEventTransition.toDefaultState(State<T> state, {Duration? after, Condition<T>? condition, dynamic type = TransitionType.externalTransition, Action<T>? action})
Wraps a state's default substate (first substate) in a transaction for use with the engine.
factory

Properties

action Action<T>?
An action to take when the transition is triggered.
finalinherited
after Duration?
Time to trigger this. If null, this trabnsition triggers on its condition
final
condition Condition<T>?
If true, this transition should be triggered.
finalinherited
description String
A human-readable description. If none supplied, returns a default description.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
source State<T>?
Reference back to the containing state.
latefinalinherited
targets Iterable<String>
IDs of all of the target states to activate.
finalinherited
targetStates Iterable<State<T>>
The actual target states.
latefinalinherited
type TransitionType
Is this triggered by internal or external events?
finalinherited

Methods

matches({String? anEvent, Duration? elapsedTime, T? context, dynamic ignoreContext = false}) bool
Tests whether this transition matches based on elapsedTime and/or condition, ignoring anEvent.
override
meetsCondition(T? context) bool
Tests condition
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resolveStates(State<T> parent, Map<String, State<T>> stateMap) → void
Populates targetStates from targets.
inherited
toString() String
A string representation of this object.
inherited

Operators

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