Transformations.map Lifecycle
I have following code :
val liveData = MutableLiveData()
liveData.value = "Ali"
val res = map(liveData) { post(it) }
textview.text = res.value.toString()
fun post(name: String): String {
return "$name $name"
}
I expect it to print Ali Ali but it prints a null value. What am I missing?