isTerminal property
bool
isTerminal
A state is a terminal state if it has no transitions and therefore we can never leave this state. We need to check any parent states as we inherit transitions from all our ancestors.
Implementation
bool get isTerminal => getTransitions().isEmpty;