SharedPreferencesContentProvider class

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

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

get(String key) Future
Reads a value of any type from persistent storage under the specified content provider.
getAll() Future<Map<String, dynamic>>
Reads all key-value pairs from persistent storage under the specified content provider.
init({String? providerAuthority}) Future
Set Content provider URI and Authority
listen(void onData(dynamic event)?, {String? key, Function? onError, void onDone()?, bool? cancelOnError}) StreamSubscription
Listen value change If provide key, only receive notify when value of key change If key is null, all value change will notify
putBool(String key, bool value) Future
Saves a boolean value to persistent storage under the specified content provider.
putDouble(String key, double? value) Future
Saves a double value to persistent storage under the specified content provider.
putInt(String key, int? value) Future
Saves an integer value to persistent storage under the specified content provider.
putString(String key, String? value) Future
Saves a string value to persistent storage under the specified content provider.
remove(String key) Future
Removes an entry from persistent storage under the specified specified content provider.
removeAll() Future
Removes all entry from persistent storage under the specified specified content provider.