I want to use LiveData with Kotlin and have values that should not be null. How do you deal with this? Perhaps a wrapper around LiveData? Searching for good patterns here .. As
I created an extension property. It's not super pretty, but it is pretty straightforward.
val LiveData.valueNN get() = this.value!!
Usage
spinner.loading = myLiveData.valueNN.homeState.loading
I'm not sold on appending "NN" as a good naming convention, but that's beyond the scope of the question :)