InMemorySharedPreferencesStore class
Stores data in memory.
Data does not persist across application restarts. This is useful in unit-tests.
- Inheritance
-
- Object
- PlatformInterface
- SharedPreferencesStorePlatform
- InMemorySharedPreferencesStore
Constructors
- Instantiates an empty in-memory preferences store.
-
Instantiates an in-memory preferences store containing a copy of
data
.
Properties
Methods
-
clear(
) → Future< bool> -
Removes all keys and values in the store where the key starts with 'flutter.'.
override
-
clearWithParameters(
ClearParameters parameters) → Future< bool> -
Removes all keys and values in the store that match
options
.override -
clearWithPrefix(
String prefix) → Future< bool> -
Removes all keys and values in the store with given
prefix
.override -
getAll(
) → Future< Map< String, Object> > -
Returns all key/value pairs persisted in this store where the key starts with 'flutter.'.
override
-
getAllWithParameters(
GetAllParameters parameters) → Future< Map< String, Object> > -
Returns all key/value pairs persisting in this store that match
options
.override -
getAllWithPrefix(
String prefix) → Future< Map< String, Object> > -
Returns all key/value pairs persisting in this store that have given
prefix
.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
remove(
String key) → Future< bool> -
Removes the value associated with the
key
.override -
setValue(
String valueType, String key, Object value) → Future< bool> -
Stores the
value
associated with thekey
.override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited