Store constructor

Store(
  1. List<StateBase> states
)

Implementation

Store(List<StateBase> states) {
  _dispatcher = BehaviorSubject<Action>.seeded(_action);
  _states = states;
  _store = BehaviorSubject<Map<String, dynamic>>.seeded(_initialState());
  _actions = Actions(_dispatcher);
  _subs = Map<String, StreamSubscription<Action>>();
  _effSub = EffectSubscription(_dispatcher);
  _dispatcherSubscription = _dispatcher.listen((action) {
    _combineStates(_store.value, action);
  });
}