coroutinedispatcher
04/25/2021, 8:02 PMwith
keyword?
with(myFragmentBinding){
viewId.text = stateDataClass.name
viewId2.text = stateDataClass.lastName
viewId3.text = stateDataClass.phoneNumber
}
And I was thinking if there is any nice way of also not repeating the right part. Something like with(Pair(binding, modelClass))
doesn’t look pretty nice to me as it might look a little bit ugly and not intuitive (first.viewId.text = second.name
) which I don’t like. A nested with is also ugly IMO. Any opinions, thoughts?Mohan Babu Malairaj
04/26/2021, 7:35 AMviewId.text = it.name
viewId2.text = it.lastName
viewId3.text = it.phoneNumber
}