SharedPrefsStores class

Implemented types

Constructors

SharedPrefsStores({Map<String, Map<String, dynamic>>? defaultValue, bool memoryStore = false})

Properties

hashCode int
The hash code for this object.
no setterinherited
keys List<String>
no setteroverride
map Map<String, Map<String, dynamic>>
no setteroverride
memoryStore bool
final
prefs ↔ SharedPreferences
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
storagePrefix String
no setteroverride
values List<Map<String, dynamic>>
no setteroverride

Methods

delete(String key) Future<void>
Removes the key from the persistent store
override
get(String key) Map<String, dynamic>?
Gets the value of the specified key, if it hasn't been cached yet, it caches it. If the key doesn't exist it throws an error.
override
getAll() List<Map<String, dynamic>>
Gets all of the values of the store
override
has(String key) bool
override
init() Future<void>
Initializes the store, loading all persistent values into memory.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
set(String key, Map<String, dynamic> value) Future<void>
Sets the value of a key within the store, overwriting the value if it exists.
override
toString() String
A string representation of this object.
inherited
update(String key, Map<String, dynamic> value) Future<void>
Updates the value of a key. Fails if it does not exist.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited