WareContext class

The context in which a middleware or afterware function executes.

In a manner similar to the streaming architecture used for reducers, ReduxStore offers each ReduxBloc the chance to apply middleware and afterware functionality to incoming Actions by listening to the "dispatch" stream, which is of type Stream<WareContext<S>>.

Middleware and afterware functions can examine the incoming action and current state of the app and perform side effects (including dispatching new ReduxActions using dispatcher. Afterward, they should emit a new WareContext for the next ReduxBloc.

Constructors

WareContext(DispatchFunction dispatcher, ReduxStateInner state, ReduxAction action)
const

Properties

action ReduxAction
final
dispatcher DispatchFunction
final
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
state ReduxStateInner
final

Methods

copyWith(ReduxAction newAction) WareContext
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
A string representation of this object. [...]
inherited

Operators

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