Package-level declarations
Types
Link copied to clipboard
typealias DataStoreKey<T, BACKED_BY> = AsyncKey<T, BACKED_BY, DataStoreValueGetter, DataStoreValueSetter>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Wrapper for values emitted by mutableStateFlow. Because DataStore can only be read asynchronously, these state flows can't be initialized with a real value; Uninitialized distinguishes that startup state from a genuine read of an absent key (which emits Loaded with a null value).
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
class TypedMutablePreferences(mutablePrefs: MutablePreferences) : TypedPreferences, DataStoreValueSetter
Link copied to clipboard
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
suspend fun DataStore<Preferences>.edit(action: suspend TypedMutablePreferences.() -> Unit): TypedPreferences
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun DataStore<Preferences>.launchEdit(scope: CoroutineScope, action: suspend TypedMutablePreferences.() -> Unit): Job
Link copied to clipboard
Link copied to clipboard
fun <T> DataStore<Preferences>.mutableStateFlow(key: DataStoreKey<T, *>, scope: CoroutineScope, debounceWrites: Duration = Duration.ZERO): MutableStateFlow<DataStoreValue<T>>
Returns a MutableStateFlow that starts as DataStoreValue.Uninitialized, reflects the latest value of key as DataStoreValue.Loaded emissions, and persists any DataStoreValue.Loaded values set on it (a loaded null value removes the entry; setting DataStoreValue.Uninitialized is a no-op on the store).
Link copied to clipboard
fun <T> DataStore<Preferences>.property(key: DataStoreKey<T, *>, scope: CoroutineScope): DelegateProperty<T?>
Returns a nullable property delegate backed by mutableStateFlow; it reads null until the first value is loaded from the store, and setting null removes the entry.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard