onEnter method

void onEnter(
  1. void callback(
    1. S
    )
)

Sets callback that will be called right after machine enters this state.

Implementation

void onEnter(void Function(S) callback) {
  _stateDefinition.onEnter = (STATE s) => callback(s as S);
}