addState method

void addState (
  1. BaseState stateInstance
)

This method is usefull to add a state passing stateInstance on demand.

Implementation

void addState(BaseState stateInstance) {
  removeStateByStateName(stateInstance.name, false);
  _states.add(stateInstance);
  dispatcH(Action(type: 'add_state(${stateInstance.name})'));
}