-
Notifications
You must be signed in to change notification settings - Fork 29.7k
feat: added custom padding in PopupMenuButton #96657
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: added custom padding in PopupMenuButton #96657
Conversation
darrenaustin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@arafaysaleem thanks for the contribution! Nice work. Just a minor comment below.
|
It also appears to have some merge conflicts with the current master branch. |
Coincidentally, somebody seems to have added a new feature to the exact same files :p. I'll resolve the conflict and the docs, then send an updated PR. |
|
Thanks. Looks like there are some trailing spaces that the analyzer is complaining about (see the |
@darrenaustin all checks passed 👍 |
gspencergoog
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
darrenaustin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM to me too. Thx to both you and @Moluram for contributing to this.
This reverts commit 49c5871 because it breaks golden tests in Google testing.
|
I don't see the changes in master or stable. |
|
It appears that a regression occured here and we lost the content of this PR which is nowhere to be found anymore. |
|
Yes, it was reverted in #96781 because it seems to add extra padding around the top and bottom of the button that didn't used to be there. |
|
So it won't be supported in the near future? |
|
Any update for this? |
|
Hmm, why was this reverted? Now we only have this constant value of 8 and no way of changing it, See: flutter/packages/flutter/lib/src/material/popup_menu.dart Lines 633 to 636 in f7997c5
|
|
Are there any plans to fix this behavior so that we can control the vertical padding? |
## Description This PR exposed `PopupMenuButton.menuPadding` parameter to override the hardcoded value. Credits to @Moluram for the original PR #81996. And to @arafaysaleem for the update in #96657. #96657 was reverted due to a Google testing failure. `PopupMenuButton` implementation has evolved since that time so maybe we will not hit this Google testing failure. And if we do, we will try to figure out what is going on. ## Related Issue Fixes #143512. Fixes #57110 ## Tests Adds 2 tests, updates several tests.
## Description This PR exposed `PopupMenuButton.menuPadding` parameter to override the hardcoded value. Credits to @Moluram for the original PR flutter#81996. And to @arafaysaleem for the update in flutter#96657. flutter#96657 was reverted due to a Google testing failure. `PopupMenuButton` implementation has evolved since that time so maybe we will not hit this Google testing failure. And if we do, we will try to figure out what is going on. ## Related Issue Fixes flutter#143512. Fixes flutter#57110 ## Tests Adds 2 tests, updates several tests.

Provides ability to change PopupMenuButton popup menu padding. Credits to @Moluram for the original PR #81996 .
Fixes #57110.
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.