How do I reflect changes in some values in the List to LazyColumn in real time?
val postDataList = postViewModel.postDataList.collectAsLazyPagingItems()
LazyColumn(
modifier = Modifier
.background(CustomColor.BackGround)
.fillMaxWidth(),
state = postScrollState
) {
itemsIndexed(postDataList.itemSnapshotList.items) { _, post ->
Post(viewModel, userData, post)
}
}
model object's list , and uses thesizeof thelistforitems(), later you can use the{it -> }it to modify the data inside list.