Hi! I have a `DropdownMenu` with some `DropdownMe...
# compose
a
Hi! I have a
DropdownMenu
with some
DropdownMenuItem
I want to show some items with icon and some without... but i got this: code in 🧵
Copy code
DropdownMenuItem(onClick = {}) {
                    Row(
                        modifier = Modifier.fillMaxWidth(),
                        verticalAlignment = Alignment.CenterVertically,
                    ) {
                        Icon(
                            imageVector = Icons.Default.Person,
                            contentDescription = action.contentDescription,
                            tint = LocalContentColor.current,
                        )
                        Text(text = "Action #0")
                    }
                }
c
Are you building this in a loop? You could introduce a conditional statement in your
Row
that shows/hides the icon
a
yes. The problem is that Popup not grows when items are bigger...