Skip to content

Instantly share code, notes, and snippets.

@pavan5208
Last active July 14, 2021 07:00
Embed
What would you like to do?
import androidx.datastore.core.DataStore
import androidx.datastore.dataStore
private val USER_DATA_STORE_FILE_NAME = "user_store.pb"
val Context.userDataStore: DataStore<UserStore> by dataStore(
fileName = USER_DATA_STORE_FILE_NAME,
serializer = UserStoreSerializer
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment