//Extensions for Jetpack Lifecycle/it.czerwinski.android.lifecycle.livedata/filterNotNull

filterNotNull

[androidJvm]
Content
fun <T> LiveData<T?>.filterNotNull(): LiveData<T>
More info

Returns a LiveData emitting only non-null values from this LiveData.

Example:

val userLiveData: LiveData<User?> = …
val nonNullUserLiveData: LiveData = userLiveData.filterNotNull()