I noticed today that my preview doesn't work if I have a flow as a parameter to a Composable i.e. the below will always render as emptyMap()
@Composable
fun BakesList(
bakes: Flow<Map<Bake, List<Ingredient>>>,
) {
val bakesMap by bakes.collectAsState(initial = emptyMap())
LazyColumn {
//display columns
//...
}
}
If I change my Composable parameter to a Map<Bake, List<Ingredient>>
then everything renders correctly. Is there a simple fix for this other than redesigning all my composables?