whenStateAction method

dynamic whenStateAction(
  1. Map<String, Function> actions
)

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;
}