RxSharedPreferences class abstract

Get Streams by key from persistent storage.

Inheritance
Implemented types
Available Extensions

Constructors

RxSharedPreferences(FutureOr<SharedPreferences> prefsOrFuture, [RxSharedPreferencesLogger? logger, void onDispose()?])
Construct a RxSharedPreferences with SharedPreferences and optional Logger
factory
RxSharedPreferences.getInstance()
Return default singleton instance. Custom logger via RxSharedPreferencesConfigs.logger.
factory

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
dispose() Future<void>
Clean up resources - Closes the streams.
inherited
executeUpdate<T extends Object>(String key, Decoder<T?> decoder, Transformer<T?> transformer, Encoder<T?> encoder, [void options]) Future<void>
Read–modify–write.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
observe<T extends Object>(String key, Decoder<T?> decoder, [void options]) Stream<T?>
Return Stream that will emit value read from persistent storage. It will automatic emit value when value associated with key was changed.
inherited
observeAll([void options]) Stream<Map<String, Object?>>
Return Stream that will emit all values associated with key read from persistent storage. It will automatic emit all keys when any value was changed.
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.
inherited
remove(String key, [void options]) Future<void>
Removes an entry from persistent storage.
inherited
toString() String
A string representation of this object.
inherited
update<T extends Object>({required String key, required Decoder<T?> decoder, required Transformer<T?> transformer, required Encoder<T?> encoder, void options}) Future<void>
Read–modify–write.
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