I find a solution for now. Maybe it's not the efficient way, but it is working in my scenario. Below is the code.
val updatedTabs = tabsList.get()
// setting the data
tabsList.get()?.first { it.isSelected }?.setPrice(price)
// setting a new list
tabsList.set(updatedTabs?.toList())
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…