Created
March 17, 2022 15:58
-
-
Save jhonatansabadi/11b6210d98020357e06c1e9aa1f25a3e to your computer and use it in GitHub Desktop.
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
fun setUser(): User { | |
viewModelScope.launch { | |
val name = getNameFromApi() | |
val lastName = getLastNameFromApi() | |
_user.value = User(name, lastName) | |
} | |
} | |
fun setUserConfigurations(): User { | |
viewModelScope.launch { | |
val configuration = getConfigurationsFromApi() | |
_configurations.value = configuration | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment