CorePreferencesDataStore

Typed against DataStore<Preferences>, whose payload type has no wasmJs variant, so it cannot sit behind Store.

Properties

Link copied to clipboard
abstract val data: Flow<Preferences>

Functions

Link copied to clipboard

Presents an existing store as CorePreferencesDataStore; the wrapper adds nothing but identity.

Link copied to clipboard
fun <T> DataStore<T>.asStore(): Store<T>

Adapts a real DataStore<T> (android/jvm/iOS only — androidx.datastore:datastore has no wasmJs variant) to the platform-neutral Store. Every CoreDatastoreAndroidBindings/desktop platform call site that used to hand a DataStore<T> straight to an asCoreXDataStore() wrapper now inserts this adapter first: protoStore(...).asStore().asCoreXDataStore().

Link copied to clipboard
abstract suspend fun updateData(transform: suspend (t: Preferences) -> Preferences): Preferences