A middleware that wires up the actions dispatched to the store to the Epic that was passed in.

It is recommended that you put your EpicMiddleware first when constructing the list of middleware for your store so any actions dispatched from your Epic will be intercepted by the remaining Middleware.

Example:

var epicMiddleware = new EpicMiddleware(new ExampleEpic());
var store = new Store<List<Action>, Action>(reducer,
  initialState: [], middleware: [epicMiddleware]);
Inheritance
  • Object
  • Middleware<State, Action>
  • EpicMiddleware

Constructors

EpicMiddleware(Epic<State, Action> epic)

Properties

actions → StreamController<Action>

read-only
epic Epic<State, Action>

read / write
epics → StreamController<Epic<State, Action>>

read-only
hashCode → int

Get a hash code for this object.

read-only, inherited
isSubscribed → bool

read / write
runtimeType → Type

A representation of the runtime type of the object.

read-only, inherited

Operators

operator ==(other) → bool

The equality operator.

inherited

Methods

call(Store<State, Action> store, Action action, NextDispatcher next) → dynamic

noSuchMethod(Invocation invocation) → dynamic

Invoked when a non-existent method or property is accessed.

inherited
replaceEpic(Epic<State, Action> newEpic) → dynamic

Replaces the epic currently used by the middleware.

toString() → String

Returns a string representation of this object.

inherited