Is there a reason why `DropdownMenu` takes an `exp...
# compose
c
Is there a reason why
DropdownMenu
takes an
expanded
parameter, but something like
AlertDialog
does not? What kind of requirements / constraints go into deciding whether a composable should have such a parameter?
m
The dropdown menu does animation when going from expanded to not, so it needs to be called even when not expanded. AlertDialog don't have animation, so to show or hide you just call or not call the function.
☝️ 1