Accumulator class

An accumulator for reducer functions.

ReduxStore offers each ReduxBloc the opportunity to apply its own reducer functionality in response to incoming ReduxActions by subscribing to the "reducer" stream, which is of type Stream<Accumulator<S>>.

A ReduxBloc that does so is expected to use the ReduxAction and state provided in any Accumulator it receives to calculate a new state, then emit it in a new Accumulator with the original action and new state. Alternatively, if the Bloc doesn't want to make a change to the state, it can simply return the Accumulator it was given.

Constructors

Accumulator(ReduxAction action, ReduxStateInner state)
const

Properties

action ReduxAction
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
state ReduxStateInner
final

Methods

copyWith(ReduxStateInner newState) Accumulator
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