Created
September 7, 2023 20:17
-
-
Save karim-eg/3246222873510274fe621808ffd675f4 to your computer and use it in GitHub Desktop.
Save User 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 saveUserData(name: String, email: String) { | |
user.edit { usrData -> | |
usrData[DataStoreKeys.USER_NAME] = name | |
usrData[DataStoreKeys.EMAIL] = email | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment