Package-level declarations

Types

Link copied to clipboard

Thrown when android.content.SharedPreferences.Editor.commit fails in CoroutinePreference.asCollector

Functions

Link copied to clipboard
fun <T> Preference<T>.asCollector(committing: Boolean = false): FlowCollector<T>

An action which stores a new value for this preference

Link copied to clipboard

Observe changes to this preference. The current Preference.value or Preference.defaultValue will be emitted on start of collection.

Link copied to clipboard
suspend fun <T> Preference<T>.commitValue(value: T): Boolean

Saves the given value using android.content.SharedPreferences.Editor.commit, suspending using Dispatchers.IO.

Link copied to clipboard

Deletes the underlying value using android.content.SharedPreferences.Editor.commit, suspending using Dispatchers.IO.