Open bochelie1000 opened 1 year ago
Hi @bochelie1000. This seems to be about DropdownButton being customizable in which there is a currently open issue https://github.com/flutter/flutter/issues/25151, you can upvote and comment on the existing issue. Kindly confirm this suits your case as well.
My question is for a different option however, it is a customization. If it is better to add it to that question than lets do it.
This issue is missing a priority label. Please set a priority label when adding the triaged-design
label.
Thanks a lot for filing this issue! Have you tried our M3 MenuAnchor
or DropdownMenu
? By customizing leadingIcon
in DropdownMenu
, I think we can set some offset before the leading widget:)
Thanks a lot for filing this issue! Have you tried our M3
MenuAnchor
orDropdownMenu
? By customizingleadingIcon
inDropdownMenu
, I think we can set some offset before the leading widget:)
Well, I really needed the DropDownButton because of some functionality which I cant remember now. I tried the DropdownMenu but this could not do what I want. I dont remember if I tried MenuAnchor, but I probably would because I remember trying a lot of things.
Is there any update or workaround on How to achieve this using DropdownMenu?
Only thing I know is that you should use DropdownMenu instead of DropdownButton which this question was orginaly ment for if using Material3. From what I see DropdownMenu is very nice and does automatically open to the bottom if there is space for it. It is a pity that their is little feedback on this.
See example at https://api.flutter.dev/flutter/material/DropdownMenu-class.html
Is there an existing issue for this?
Use case
DropdownButton should have the possibility to open below itself. At the moment this is not an option. See your own example: https://api.flutter.dev/flutter/material/DropdownButton-class.html In there the dropdownbutton opens above the button itself.
Proposal
PopupMenuButton has the possibility to change the starting offset. By changing the offset to 40 the PopupMenuButton opens below itself:
PopupMenuButton( offset: const Offset(0, 40),
Please can you add this to DropdownButton as well? And thuse allow Dropdownbutton to open below itself.
It seems that Dropdownbutton2 from pub.dev does open as desired just below the dropdownbutton2 itself. However that is not a flutter package and thus I prefer not to use it in production apps. https://pub.dev/packages/dropdown_button2