Accumulator<S> class

An accumulator for reducer functions.

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

A Bloc that does so is expected to use the Action 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(Action action, S state)
const

Properties

action Action
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 → S
final

Methods

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