ReduxStore class

A store for app state that manages the dispatch of incoming actions and controls the stream of state objects emitted in response.

ReduxStore performs these tasks:

  • Create a controller for the dispatch/reduce stream using an initialState value.
  • Wire each ReduxBloc into the dispatch/reduce stream by calling its applyMiddleware, applyReducers, and applyAfterware methods.
  • Expose the dispatch method with which a new ReduxAction can be dispatched.

Constructors

ReduxStore({List<ReduxBloc> blocs = const [], bool isDebug = false})

Properties

actionListener Stream<ReduxAction>
read-only
debugActionList List<ReduxAction>
final
hashCode int
The hash code for this object. [...]
read-only, inherited
isDebug bool
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
states BehaviorSubject<ReduxStateInner>
final

Methods

clearAllState() → void
clearDebugActionList() → void
dispatch(ReduxAction action) → void
dispose() → void
Invokes the dispose method on each Bloc, so they can deallocate/close any long-lived resources.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
popState(String name) → void
pushState(String name) → void
toString() String
A string representation of this object. [...]
override

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited

Static Methods

buildState(List<ReduxBloc> blocs) ReduxStateInner