preferencesOf

Construct a Preferences object with a list of Preferences.Pair. Comparable to mapOf().

Example usage:

val counterKey = intPreferencesKey("counter")
val preferences = preferencesOf(counterKey to 100)

Parameters

pairs

the key value pairs with which to construct the preferences