onExit method
void
onExit(
- void callback(
- S
Sets callback that will be called right before machine exits this state.
Implementation
void onExit(void Function(S) callback) {
_stateDefinition.onExit = (STATE s) => callback(s as S);
}