isCommand property

bool? isCommand
final

Indicates whether the event is a command, otherwise it will be determined automatically when generating the state machine.

It is recommended to explicitly specify the value only for special events (e.g. CancelEvent).
This will allow such events to change the logic of the states performing the actions, in particular, they will stop early at the state machine level, due to a forced transition to another state.
This approach is completely safe, since the state machine does this natively.

For states that perform actions outside the state machine, the safety of such transitions must be ensured at the level of the frameworks used or in some other way.

Implementation

final bool? isCommand;