ReduxStoreStreamTransformer<A, S> class
Transform stream of actions to stream of states.
A ReduxStore takes Actions from upstream as input events. SideEffects can be registered to listen for a certain Action to react on a that Action as a (impure) side effect and create yet another Action as output. Every Action goes through the a Reducer, which is basically a pure function that takes the current State and an Action to compute a new State. The new state will be emitted downstream to any listener interested in it.
A ReduxStore stream never reaches onDone(). If a error occurs in the Reducer or in any side effect (any has been thrown) then the ReduxStore reaches onError() as well and according to the reactive stream specs the store cannot recover the error state.
- Inheritance
-
- Object
- StreamTransformerBase<
A, S> - ReduxStoreStreamTransformer
Constructors
-
ReduxStoreStreamTransformer({required S initialStateSupplier(), required Iterable<
SideEffect< sideEffects, required Reducer<A, S> >A, S> reducer, RxReduxLogger? logger}) -
- Param
initialStateSupplier
A function that computes the initial state. The computation is- done lazily once an observer subscribes. The computed initial state will be emitted directly in onListen()
- Param
sideEffects
The sideEffects. See SideEffect- Param
reducer
The reducer. See Reducer.- Param
logger
The logger that logs messages.- Param
S
The type of the State- Param
A
The type of the Actions - Param
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
bind(
Stream< A> stream) → Stream<S> -
Transforms the provided
stream
.override -
cast<
RS, RT> () → StreamTransformer< RS, RT> -
Provides a
StreamTransformer<RS, RT>
view of this stream transformer.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited