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
whenStateAction(Map<String, Function> actions) {
_stateActions = actions;
}