Created
July 19, 2020 15:31
-
-
Save 1jGabriel/7b534e3d64f8f6a8ef02c8aa6de8d422 to your computer and use it in GitHub Desktop.
Obter dados do ViewModel
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 getData() { | |
lifecycleScope.launch { | |
viewModel.getItems().collectLatest { | |
adapter.submitData(it) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment