Store class
A comfortable way to develop reactive widgets. You can dynamically add or remove effects and states and many more.
- Implemented types
Constructors
Properties
- actions → Actions
-
read-only
-
dispatcher
→ BehaviorSubject<
Action> -
read-only, override
- 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
- value → dynamic
-
read-only
Methods
-
addEffect(
EffectCallback callback, {String effectKey} ) → void - This method is usefull to add a single effect passing a callback ( Actions action$, Store store$)=>Stream and effectKey on demand. [...]
-
addEffects(
EffectBase effectInstance ) → void - This method is usefull to add effects passing effectInstance on demand.
-
addState(
StateBase stateInstance ) → void - This method is usefull to add a state passing stateInstance on demand.
-
dispatcH(
String actionType, [dynamic payload] ) → void -
override
-
dispatch(
Action action ) → void -
override
-
dispose(
) → void -
It's a clean up function.
override
-
exportState(
) → Stream< List> -
return latest stream of
action, state
array. [...] -
importState(
Map< String, dynamic> state) → void - state object should be a Map<String, dynamic> state [...]
-
noSuchMethod(
Invocation invocation ) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
-
removeEffectsByKey(
String effectKey ) → void - This method is usefull to remove effects passing effectKey on demand.
-
removeStateByStateName(
String stateName, [bool shouldDispatch = true] ) → void - This method is usefull to remove a state passing stateName on demand.
-
select<
T> (String stateName ) → Stream< T> - This method takes a single param String stateName and return Stream/Stream [...]
-
selectMany<
T> (T callback(Map< String, dynamic> state) ) → Stream< T> - This method takes a callback which has a single Map<String, dynamic> type arg. If you pass Map key as a state name then you will get corresponding model instance as value. [...]
-
toString(
) → String -
Returns a string representation of this object.
inherited
Operators
-
operator ==(
Object other ) → bool -
The equality operator. [...]
inherited