onFork<E extends Event> method
void
onFork<E extends Event>(})
Used to enter a co-region by targeting the set of states within the coregion to transition to.
Implementation
void onFork<E extends Event>(BuildFork<E> buildFork,
{GuardCondition<E> condition = noopGuardCondition,
SideEffect<E>? sideEffect,
String? conditionLabel,
String? sideEffectLabel}) {
final builder = ForkBuilder<E>();
buildFork(builder);
final definition = builder.build();
final choice = ForkTransitionDefinition<S, E>(
_stateDefinition, definition, condition, sideEffect,
sideEffectLabel: sideEffectLabel, conditionLabel: conditionLabel);
_stateDefinition.addTransition(choice);
}