Package-level declarations

Types

Link copied to clipboard
class PrefsKey<T>

A platform-neutral key into a PrefsStore, mirroring Preferences.Key. Equal by name, so a key built fresh for the same name addresses the same value.

Link copied to clipboard
interface PrefsSnapshot

Read-only view of a PrefsStore's current values. Mirrors androidx.datastore.preferences.core.Preferences.

Link copied to clipboard
interface PrefsStore

The part of DataStore<Preferences> the prefs use; androidx.datastore.preferences publishes no wasmJs variant. nonWebMain's DataStorePrefsStore wraps a real DataStore, wasmJsMain's LocalStoragePrefsStore uses localStorage. The transform is not suspending, so no suspension point can fall between a read and its write.

Functions

Link copied to clipboard

Adapts a real DataStore<Preferences> (android/jvm/iOS only — androidx.datastore.preferences has no wasmJs variant) to the platform-neutral PrefsStore. Every CorePrefsAndroidBindings/DesktopPreferencesDataStoreBindings call site that used to hand a DataStore<Preferences> straight to an asXDataStore() wrapper now inserts this adapter first: store(...).asPrefsStore().asXDataStore().

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard