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

Constructors

DispatcherImpl()

Properties

actionObservable Observable<Action>
The Observable that carries the dispatched Actions.
final
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
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
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
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

Methods

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

Operators

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