onEnter method

void onEnter(
  1. void doOnEnter(
    1. S,
    2. EVENT
    )
)

Implementation

void onEnter(void Function(S, EVENT) doOnEnter) {
  _stateDefinition.onEnterListeners
      .add((STATE state, EVENT cause) => doOnEnter.call(state as S, cause));
}