Google is committed to advancing racial equity for Black communities. See how.

Key

class Key<T>
kotlin.Any
   ↳ androidx.datastore.preferences.Preferences.Key

Key for values stored in Preferences. Type T is the type of the value associated with the Key.

T must be one of the following: Boolean, Int, Long, Float, String, Set.

Construct Keys for your data type using: preferencesKey, preferencesSetKey.

Summary

Public methods
Boolean
equals(other: Any?)

Int

Extension functions
From androidx.datastore.preferences
infix Preferences.Pair<T>
Preferences.Key<T>.to(value: T)

Infix function to create a Preferences.

Properties
String

Public methods

equals

fun equals(other: Any?): Boolean

hashCode

fun hashCode(): Int

Properties

name

val name: String