middlewares library

Classes

Action<TState>
An action is a portion of logic that will alterate the current state of the application.
ActionExecutor<TState>
A middleware that executes all the received actions.
ClearPersistence
ErrorHandler<TState>
This middleware catches all exceptions from middlewares below it and dispatches a new event from its onFailed callback if so.
EventMerger<TState>
Ignore duplicated concurent events.
EventProcessing<TState>
FunctionAction<TState>
Logging<TState>
Memento<TState>
Multi<TState>
This middleware allows to dispatch a set of events.
MultiEvent<TState>
Persistence<TState>
StateStorage<TState>
Undo<TState>

Typedefs

ApplicationFunctionCall<TState> = Stream<Updater<TState>> Function(Context<TState> context)
ApplicationFunctionCanExecute<TState> = bool Function(TState state)
ApplicationFunctionFailed<TState> = Stream<Updater<TState>> Function(Context<TState> context, TState initialState, dynamic error, StackTrace stackTrace)
OnDispatchFailed<TState> = Event Function(Context<TState> context, Event event, TState initialState, dynamic error, StackTrace stackTrace)
An error occured while dispatching the event.
Updater<TState> = TState Function(TState state)

Exceptions / Errors

ActionNotExecutableException