Created
December 28, 2019 21:27
-
-
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
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
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