Created
September 7, 2023 20:41
-
-
Save karim-eg/ff6430bd84f6acd01e29b56a7a990f83 to your computer and use it in GitHub Desktop.
Get Saved Data Using DataStore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private suspend fun getUserData() { | |
user.data.collect { usrData -> | |
val name = usrData[DataStoreKeys.USER_NAME] ?: "none" | |
val email = usrData[DataStoreKeys.EMAIL] ?: "none" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment