Shan
09/26/2019, 7:55 PMgetValue
function with @Nullable
which I would also like to do away with.louiscad
09/26/2019, 8:07 PMFlow
and bridge it to LiveData
, not exposing MutableLiveData
, and I observe only notNull values, with an extension (that I can link if you want)Shan
09/26/2019, 8:07 PMlouiscad
09/26/2019, 8:14 PMFlow
to a LiveData
, here's what you can do with latest LiveData KTX (should be in stable now):
val yourLiveData = liveData {
myFlow.collect { myData ->
/*this@liveData.*/emit(myData)
}
}
Shan
09/26/2019, 8:18 PM