SharedPreferencesAdapter class final

Adapter for the legacy cached SharedPreferences API.

Inheritance

Constructors

SharedPreferencesAdapter()
Creates a SharedPreferences adapter.
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
id → String
Stable identifier used to group values from this adapter.
no setteroverride
name → String
Human-readable storage name shown in the UI.
no setteroverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
supportsClearing → bool
Whether the adapter supports clearing the entire storage.
no setterinherited
supportsEditing → bool
Whether the adapter supports editing individual values.
no setterinherited
supportsLiveUpdates → bool
Whether the adapter can emit change notifications for live refresh.
no setterinherited

Methods

clear() → Future<void>
Removes every value managed by this adapter.
override
delete(String key) → Future<void>
Deletes the value associated with key.
override
load() → Future<StorageSnapshot>
Loads the latest storage snapshot for this adapter.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited
watch() → Stream<void>
Emits a notification whenever the underlying storage changes.
inherited
write(StorageItemMutation mutation) → Future<void>
Writes a new value for the given mutation payload.
override

Operators

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