commitValue

suspend fun <T> Preference<T>.commitValue(value: T): Boolean

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

Return

true if the data was stored, false if there was an error storing the data.