build method
build returns a Middleware function that handles all actions added with add
Implementation
Middleware<State, StateBuilder, Actions> build() =>
(MiddlewareApi<State, StateBuilder, Actions> api) =>
(ActionHandler next) => (Action<dynamic> action) {
var handler = _map[action.name];
if (handler != null) {
handler(api, next, action);
return;
}
next(action);
};