State<StateIdentifier> constructor

State<StateIdentifier>(
  1. StateIdentifier identifier,
  2. {required Map<Logic, StateIdentifier> events,
  3. required List<Conditional> actions,
  4. StateIdentifier? defaultNextState,
  5. ConditionalType conditionalType = ConditionalType.unique}
)

Represents a state named identifier with a definition of events and actions associated with that state.

If provided, the defaultNextState is the default next state if none of the events match.

Implementation

State(
  this.identifier, {
  required this.events,
  required this.actions,
  StateIdentifier? defaultNextState,
  this.conditionalType = ConditionalType.unique,
}) : defaultNextState = defaultNextState ?? identifier;