core-ktx / androidx.content / android.content.SharedPreferences

Extensions for android.content.SharedPreferences

edit

fun SharedPreferences.edit(commit: Boolean = false, action: Editor.() -> Unit): Unit

Allows editing of this preference instance with a call to apply or commit to persist the changes. Default behaviour is apply.