Add menuMaxHeight for DropdownButton #76493
Conversation
/// The [menuMaxHeight] should be less than or equal to the maximum height of | ||
/// one less row, otherwise it is invalid. |
Could you clarify what you mean here by one less row? Does this mean that if you have a menu with 5 items, it can be the maximum height of the height of 4 items? Why not up to 5 items (maybe a height that shows half an item)?
Ahh, you mean one less row compared to the view itself. Maybe clarify that, because my first thought was one less row relative to the maximum height that the menu can be, assuming the entire menu fit on the screen.
/// The maximum height of the menu. | ||
/// | ||
/// The [menuMaxHeight] should be less than or equal to the maximum height of | ||
/// one less row, otherwise it is invalid. |
You may also want to specify that if the height is set to a value greater than the allowed max height, then the allowed max height is used by default and explain why that is the case in the documentation as well. This is actually pretty well described here, so just reuse it to some degree
Looks good! It just needs some documentation to help users understand how to use this API better!
Nits on documentation
LGTM, with a little bit more of updating to the API docs. Thanks for the fix!
Remove trailing whitespace
Had to fix some trailing whitespace issues and a merge conflict. Should be good to go again as long as the bots are happy! |
This pull request is not suitable for automatic merging in its current state.
|
One more trailing whitespace
e352e08
into
flutter:master
thx |
It's really good to see this problem resolved! |
In which version of flutter will this feature appear? |
I see available for use in flutter 2.2.1+ |
To satisfy our usage, I added menuMaxHeight. By default, the height of the menu does not change.
Some people want to control it by padding, some want to set the maximum height, some want to control it by height percentage, but if only the maximum height limit is increased, other needs can be calculated by menuMaxHeight.
close #23865
Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.
The text was updated successfully, but these errors were encountered: