Skip to content

Instantly share code, notes, and snippets.

@RBusarow
Created December 28, 2019 21: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 RBusarow/a32abdc6e45f862d2221272657558009 to your computer and use it in GitHub Desktop.
Save RBusarow/a32abdc6e45f862d2221272657558009 to your computer and use it in GitHub Desktop.
example of setting a LiveData's value to null when the type is non-nullable
val someLiveData = MutableLiveData<String>()
// this compiles!!
someLiveData.value = null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment