NativeSharedPreferencesStorePlatform 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 NativeSharedPreferencesStorePlatform methods.

Implementers

Properties

hashCode int
The hash code for this object.
no setterinherited
isMock bool
Only mock implementations should set this to true.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clear() Future<bool>
Removes all keys and values in the store.
getAll() Future<Map<String, Object>>
Returns all key/value pairs persisted in this store.
getAllFromDictionary(List<String> keys) Future<Map<String, Object>>
Returns all key/value pairs persisted in this store.
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 the key.
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

instance NativeSharedPreferencesStorePlatform
The default instance of NativeSharedPreferencesStorePlatform to use.
getter/setter pair