dagomni
05/08/2020, 11:07 AMval state = viewModel.currentState.collectAsState(viewModel.getInitialState())
Column(Modifier.fillMaxSize() + Modifier.drawBackground(color = Color.Blue)){
AdapterList(modifier = Modifier.fillMaxSize(), data = state.value.dataList) {
Text(
modifier = Modifier.fillMaxWidth() + Modifier.preferredHeight(80.dp),
text = it.title,
color = Color.White
)
}
}
and gives me a runtime error while executing
LayoutNode@6292b16 children: 1 measureBlocks: MeasuringIntrinsicsMeasureBlocks@a9f8420{ measureBlock=androidx.ui.foundation.BoxKt$Box$1$1@0ed31d9 } is not measured, draw requested
When I remove AdapterList, it runs just fine
EDIT: it's not working when data parameter is an empty listAndrey Kulikov
05/08/2020, 11:44 AMdagomni
05/08/2020, 5:00 PMdagomni
05/08/2020, 5:51 PMcollectAsState
(just a guess, the value was not updated when I printed it to console)Andrey Kulikov
05/08/2020, 9:09 PM