SharedPreferencesStorePlatform class abstract
The interface that implementations of shared_preferences must implement.
Platform implementations should extend this class rather than implement it as shared_preferences
does not consider newly added methods to be breaking changes. Extending this class
(using extends
) ensures that the subclass will get the default implementation, while
platform implementations that implements
this interface will be broken by newly added
SharedPreferencesStorePlatform methods.
- Inheritance
-
- Object
- PlatformInterface
- SharedPreferencesStorePlatform
- Implementers
Constructors
- Constructs a SharedPreferencesStorePlatform.
Properties
Methods
-
clear(
) → Future< bool> - Removes all keys and values in the store where the key starts with 'flutter.'.
-
clearWithParameters(
ClearParameters parameters) → Future< bool> -
Removes all keys and values in the store that match
options
. -
clearWithPrefix(
String prefix) → Future< bool> -
Removes all keys and values in the store with given
prefix
. -
getAll(
) → Future< Map< String, Object> > - Returns all key/value pairs persisted in this store where the key starts with 'flutter.'.
-
getAllWithParameters(
GetAllParameters parameters) → Future< Map< String, Object> > -
Returns all key/value pairs persisting in this store that match
options
. -
getAllWithPrefix(
String prefix) → Future< Map< String, Object> > -
Returns all key/value pairs persisting in this store that have given
prefix
. -
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
. -
setValue(
String valueType, String key, Object value) → Future< bool> -
Stores the
value
associated with thekey
. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance ↔ SharedPreferencesStorePlatform
-
The default instance of SharedPreferencesStorePlatform to use.
getter/setter pair