whenStateAction method
Handle what happens when an action is called
actions is a map of actions
E.g. whenStateAction({ 'logout': () async { await Auth.logout(); routeToInitial(); } });
Implementation
void whenStateAction(Map<Object, Function> actions) {
_stateActions = actions;
}