createStore function
- {List<
BaseState> states, - List<
BaseEffect> effects: const []}
This is the entry point of the ajwah store. You may pass necessay states and effects is optional. Also you can dynamically add or remove state and effect using addState(BaseState stateInstance) ,removeStateByStateName(String stateName), addEffects(BaseEffect effectInstance), addEffect(EffectCallback callback, {@required String key}), removeEffectsByKey(String key)
Implementation
Store createStore({
List<BaseState> states,
List<BaseEffect> effects = const [],
}) {
_store = Store(states);
effects.forEach((effect) {
_store.addEffects(effect);
});
return _store;
}