DataStorePreference

Constructors

Link copied to clipboard
internal constructor()

Functions

Link copied to clipboard
fun asFlow(): Flow<V?>
Link copied to clipboard
fun asNotNullFlow(): Flow<V>
Link copied to clipboard
suspend fun get(): V?

Returns the first element emitted by the asFlow and then cancels flow's collection

Link copied to clipboard
suspend fun set(value: V?): Preferences

Save value into dataStore, or remove the preferences from dataStore if the value is null.