dispatch function

void dispatch (
  1. String actionType,
  2. [dynamic payload]
)

This is a helper function of store().dispatch(Action action).

Implementation

void dispatch(String actionType, [dynamic payload]) {
  try {
    _store.dispatch(actionType, payload);
  } catch (_) {
    throw "dispatch() function should not work until you enableGlobalApi:true inside createStore() function.";
  }
}