Skip to content

Instantly share code, notes, and snippets.

@NsAveek
Created November 21, 2019 16:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NsAveek/46b98c0ebcb1bfd7ea10965b42f584e8 to your computer and use it in GitHub Desktop.
Save NsAveek/46b98c0ebcb1bfd7ea10965b42f584e8 to your computer and use it in GitHub Desktop.
// having "with"
with(viewModel){
val balanceText = this.balanceText
val category = this.category.run {
value = false
}
}
// without using "with"
val balanceText = viewmodel.balanceText
val category = viewmodel.category.run {
value = false
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment