getTransitionDomain method
The smallest possible subtree containing all the transition targets.
Implementation
@visibleForOverriding
State<T>? getTransitionDomain(Transition<T> t, History<T> history) {
final tstates = getEffectiveTargetStates(t, history);
if (tstates.isEmpty) {
return null;
}
if (t.type == TransitionType.internalTransition &&
t.source!.isCompound &&
tstates.every((s) => s.descendsFrom(t.source!))) {
return t.source;
}
return State.commonSubtree([t.source!, ...tstates]);
}