SharedPreferencesLike class abstract

Wraps NSUserDefaults (on iOS) and SharedPreferences (on Android), providing a persistent store for simple data.

Data is persisted to disk asynchronously.

Inheritance
Implementers
Available extensions

Constructors

SharedPreferencesLike()

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

clear([void options]) Future<void>
Completes with true once the storage for the app has been cleared.
inherited
containsKey(String key, [void options]) Future<bool>
Returns a future complete with value true if the persistent storage contains the given key.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
read<T extends Object>(String key, Decoder<T?> decoder, [void options]) Future<T?>
Reads a value of any type from persistent storage.
inherited
readAll([void options]) Future<Map<String, Object?>>
Returns all keys in the persistent storage.
inherited
reload() Future<Map<String, Object?>>
Fetches the latest values from the host platform.
remove(String key, [void options]) Future<void>
Removes an entry from persistent storage.
inherited
toString() String
A string representation of this object.
inherited
write<T extends Object>(String key, T? value, Encoder<T?> encoder, [void options]) Future<void>
Saves a value to persistent storage.
inherited

Operators

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

Constants

errorCode → const String
Error code when an error occurs when calling a method from MethodChannel.