WrenchStore class
WrenchStore provides utility methods to save/lookup instances of any type.
Only 1 instance of a type exists at any point of time.
- Annotations
-
- @Deprecated('Use MustangStore instead')
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- hiveBox ↔ String?
-
getter/setter pair
- persistent ↔ bool
-
getter/setter pair
Static Methods
-
config(
{bool isPersistent = false, String? storeName}) → void -
delete<
T> () → void -
Removes instance of type
T
, if exists -
deletePersistedState(
List< String> deleteModels) → Future<void> -
get<
T> () → T? -
Looks up instance of type
T
, if exists. Returns null if instance of typeT
is not found. -
initPersistence(
String? storeLocation) → Future< void> -
Creates directory
boxDir
in the file system to save serialized objectsstoreLocation
is optional for Web -
nuke(
) → void - Delete all objects from the store
-
persistObject(
String key, String value) → Future< void> - Writes serialized object to a file
-
restoreState(
void callback(void update< T>(T t), String modelName, String jsonStr), List<String> serializerNames) → Future<void> - Deserializes the previously serialized string into an object and makes it available in the WrenchStore
-
update<
T> (T t) → void -
Saves instance
t
after removing, if exists, an instance ofT
-
update2<
T, S> (T t, S s) → void -
Saves instances
t
ands
after removing, if exists, an instance of typeT
and an instance of typeS
. -
update3<
T, S, U> (T t, S s, U u) → void -
Saves instances
t
,s
,u
after removing, if exists, an instance of typeT
, instance of typeS
and instance of typeU
-
update4<
T, S, U, V> (T t, S s, U u, V v) → void -
Saves instances
t
,s
,u
,v
after removing, if exists, an instance of typeT
, instance of typeS
, instance of typeU
and instance of typeV