Keep<T extends FortState<S> , S> class
abstract
A Keep is a type of Tower that comunicates with the lazy boxes within the fort to maintain state syncronization across multiple redux states
Constructors
Properties
-
awaitHydrate
→ Future<
bool> -
no setter
- fortKey → String
-
The key to the box with the object of type S
final
-
getStateAdapter
→ TypeAdapter<
T> -
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
-
hydrator
→ Completer<
bool> -
Competer for the hydrate
final
- keepKey → String
-
no setter
- keyBase → String
-
Key Base
final
- objectID → String
-
Key to the object with type S
final
-
onChange
→ Stream<
T> -
A stream that emits the current state when it changes.
no setterinherited
-
reducer
↔ Reducer<
T> -
The Reducer for your Store. Allows you to get the current reducer or
replace it with a new one if need be.
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- state → T
-
Returns the current state of the app
no setterinherited
Methods
-
dispatch(
dynamic action) → dynamic -
Runs the action through all provided Middleware, then applies an action
to the state using the given Reducer. Please note: Middleware can
intercept actions, and can modify actions or stop them from passing
through to the reducer.
inherited
-
dispatchStore(
T storeState) → void -
getStoredHydrate(
dynamic hydratedStateKey) → Future< T?> - Retreives the hydrated state from a hydratedStateKey. Retruns null if there is no state stored
-
hydrateState(
S object) → Future< T> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onReceive(
T state) → Future< void> - Runs when the receive action is run
-
receiveAction(
T state) → ThunkAction< T> - Run when a store state is received from the listener
-
retreiveObject(
String id) → Future< S> -
startHydrateAction(
{bool refresh = false, bool dry = false}) → ThunkAction< T> - Returns a hydrated state
-
storeAction(
T state) → ThunkAction< T> - Stores the state in the Fort, opposite side of this is receiveAction
-
storeState(
T storeState) → Future - Stores the current state into hive and returns the id
-
teardown(
) → Future -
Closes down the Store so it will no longer be operational. Only use this
if you want to destroy the Store while your app is running. Do not use
this method as a way to stop listening to onChange state changes. For
that purpose, view the onChange documentation.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited