flutter icon indicating copy to clipboard operation
flutter copied to clipboard

Add spacing between `MenuAnchor` and `dropdownMenuEntries` in `DropdownMenu`

Open jasonkang14 opened this issue 2 years ago • 1 comments

Use case

I am trying to build an interface like the attached image using DropdownMenu where there is space between MenuAnchor and dropdownMenuEntries.

Screenshot 2024-07-10 at 4 12 05 PM

Proposal

Would you guys be open to accepting a pull request if i were to add an optional property called spacing to DropdownMenu and add a SizedBox to add a margin between MenuAnchor and dropdownMenuEntries? I think it would look something like below

return _DropdownMenuBody(
          width: widget.width,
          children: <Widget>[
            textField,
            SizedBox(height: spacing),
            for (final Widget item in _initialMenu!) item,
            trailingButton,
            leadingButton,
          ],
        );

jasonkang14 avatar Jul 10 '24 07:07 jasonkang14

Sounds good! Go ahead and make the PR; you can @ me in the description and I'll have a look 🙂

nate-thegrate avatar Jul 13 '24 19:07 nate-thegrate

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

github-actions[bot] avatar Aug 08 '24 06:08 github-actions[bot]