registerState<S> function
- {@required String stateName,
- @required S initialState,
- @required MapActionToStateCallback<
S> mapActionToState}
This method is usefull to add a state passing stateInstance on demand.
Implementation
void registerState<S>(
{@required String stateName,
@required S initialState,
@required MapActionToStateCallback<S> mapActionToState}) {
try {
_store.registerState(
stateName: stateName,
initialState: initialState,
mapActionToState: mapActionToState);
} catch (_) {
throw "registerState() function should not work until you exposeApiGlobally:true inside createStore() function.";
}
}