DispatcherImpl class

Dispatcher implementation.

Extend this class to create a Dispatcher with basic functionality and management of the ValueBloc.outputObservable for ValueBloc and its subclasses.

An interface class that extends or implements Bloc should be created for every created subclass of BlocImpl. The interface is not required but prevents access from internal variables. See section at the bottom of BlocImpl class documentation for reasoning.

Implemented types




actionObservable Observable<Action>
The Observable that carries the dispatched Actions.
blocMap Map<String, Bloc>
A map of all registered Blocs with the Blocs key as the maps key and the Bloc as the value. [...]
@protected, final
closed bool
Check if this BaseDispatcher is closed. [...]
read-only, override
hashCode int
The hash code for this object. [...]
read-only, inherited
inputObservable Observable<Action>
The Observable carrying the Actions being dispatched through all added Observables.
@protected, final
inputObservableMap Map<String, Observable<Action>>
A map of all added input Observables with the String given when it was added as the key and the Observable as the value.
@protected, final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
stateBlocMap Map<String, StateBloc>
A map of all registered StateBlocs with the StateBlocs key as the maps key and the StateBloc as the value.
@protected, final
subject Subject<Action>
The Subject managing the actionObservable.
@protected, final
valueBlocMap Map<String, ValueBloc>
A map of all registered ValueBlocs with the ValueBlocs key as the maps key and the ValueBloc as the value. [...]
@protected, final


addBloc(Bloc bloc) → void
Registers bloc with this Dispatcher. [...]
addInputObservable(String key, Observable<Action> observable) → void
Start dispatching all Actions from observable. [...]
dispatch(Action action) → void
Dispatch action to all observers of actionObservable. [...]
@mustCallSuper, override
dispose() → void
Perfrom any cleanup operations required. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
removeBloc(Bloc bloc) → void
Removes bloc from this Dispatcher. [...]
removeBlocWithKey(String key) → void
Removes the Bloc with Bloc.key key. [...]
removeInputObservable(String key) → void
Stop dispatching Actions from the Observable added with key. [...]
toString() String
A string representation of this object. [...]


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