Skip to content

Instantly share code, notes, and snippets.

@meet30997
Last active September 5, 2022 06:42
Show Gist options
  • Save meet30997/8b8773aed27257c1acfa52b193c1d863 to your computer and use it in GitHub Desktop.
Save meet30997/8b8773aed27257c1acfa52b193c1d863 to your computer and use it in GitHub Desktop.
DataStore Observe
viewModel.setUserName("Meet")
viewModel.getUsername.observe(this) {
binding.userName.text = it
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment