payload: {"action":"created","issue":{"url":"https://api.github.com/repos/flutter/flutter/issues/44170","repository_url":"https://api.github.com/repos/flutter/flutter","labels_url":"https://api.github.com/repos/flutter/flutter/issues/44170/labels{/name}","comments_url":"https://api.github.com/repos/flutter/flutter/issues/44170/comments","events_url":"https://api.github.com/repos/flutter/flutter/issues/44170/events","html_url":"https://github.com/flutter/flutter/pull/44170","id":517657369,"node_id":"MDExOlB1bGxSZXF1ZXN0MzM2NjgzODEx","number":44170,"title":"Expose showButtonMenu of PopupMenuButtonState","user":{"login":"creativecreatorormaybenot","id":19204050,"node_id":"MDQ6VXNlcjE5MjA0MDUw","avatar_url":"https://avatars2.githubusercontent.com/u/19204050?v=4","gravatar_id":"","url":"https://api.github.com/users/creativecreatorormaybenot","html_url":"https://github.com/creativecreatorormaybenot","followers_url":"https://api.github.com/users/creativecreatorormaybenot/followers","following_url":"https://api.github.com/users/creativecreatorormaybenot/following{/other_user}","gists_url":"https://api.github.com/users/creativecreatorormaybenot/gists{/gist_id}","starred_url":"https://api.github.com/users/creativecreatorormaybenot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/creativecreatorormaybenot/subscriptions","organizations_url":"https://api.github.com/users/creativecreatorormaybenot/orgs","repos_url":"https://api.github.com/users/creativecreatorormaybenot/repos","events_url":"https://api.github.com/users/creativecreatorormaybenot/events{/privacy}","received_events_url":"https://api.github.com/users/creativecreatorormaybenot/received_events","type":"User","site_admin":false},"labels":[{"id":487496476,"node_id":"MDU6TGFiZWw0ODc0OTY0NzY=","url":"https://api.github.com/repos/flutter/flutter/labels/cla:%20yes","name":"cla: yes","color":"ffffff","default":false,"description":"@googlebot is happy with this PR."},{"id":288585660,"node_id":"MDU6TGFiZWwyODg1ODU2NjA=","url":"https://api.github.com/repos/flutter/flutter/labels/f:%20material%20design","name":"f: material design","color":"207de5","default":false,"description":"flutter/packages/flutter/material repository."},{"id":284437560,"node_id":"MDU6TGFiZWwyODQ0Mzc1NjA=","url":"https://api.github.com/repos/flutter/flutter/labels/framework","name":"framework","color":"207de5","default":false,"description":"flutter/packages/flutter repository. See also f: labels."}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2019-11-05T09:41:07Z","updated_at":"2019-12-26T23:48:57Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/flutter/flutter/pulls/44170","html_url":"https://github.com/flutter/flutter/pull/44170","diff_url":"https://github.com/flutter/flutter/pull/44170.diff","patch_url":"https://github.com/flutter/flutter/pull/44170.patch"},"body":"I created this PR a few weeks ago already (#42830), but accidentally destroyed that branch.\r\n\r\n## Description\r\n\r\nIt can be useful to be able to call `showButtonMenu` of a `PopupMenuButton` programmatically instead of it only being called when the user taps the button. There already is a `showMenu` function, however, that would require obtaining the position of the button manually and passing the items again. By exposing `showButtonMenu`, it is very easy to show the menu at the right place with the right items manually.\r\n\r\n## Tests\r\n\r\nI added the following tests:\r\n\r\n * Ensuring that the exposed method can be called and works correctly.\r\n\r\n## Checklist\r\n\r\n- [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs.\r\n- [x] I signed the [CLA].\r\n- [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement].\r\n- [x] I updated/added relevant documentation (doc comments with `///`).\r\n- [x] All existing and new tests are passing.\r\n- [x] The analyzer (`flutter analyze --flutter-repo`) does not report any problems on my PR.\r\n- [x] I am willing to follow-up on review comments in a timely manner.\r\n\r\n## Breaking Change\r\n\r\nDoes your PR require Flutter developers to manually update their apps to accommodate your change?\r\n\r\n- [x] No, this is *not* a breaking change."},"comment":{"url":"https://api.github.com/repos/flutter/flutter/issues/comments/569151454","html_url":"https://github.com/flutter/flutter/pull/44170#issuecomment-569151454","issue_url":"https://api.github.com/repos/flutter/flutter/issues/44170","id":569151454,"node_id":"MDEyOklzc3VlQ29tbWVudDU2OTE1MTQ1NA==","user":{"login":"creativecreatorormaybenot","id":19204050,"node_id":"MDQ6VXNlcjE5MjA0MDUw","avatar_url":"https://avatars2.githubusercontent.com/u/19204050?v=4","gravatar_id":"","url":"https://api.github.com/users/creativecreatorormaybenot","html_url":"https://github.com/creativecreatorormaybenot","followers_url":"https://api.github.com/users/creativecreatorormaybenot/followers","following_url":"https://api.github.com/users/creativecreatorormaybenot/following{/other_user}","gists_url":"https://api.github.com/users/creativecreatorormaybenot/gists{/gist_id}","starred_url":"https://api.github.com/users/creativecreatorormaybenot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/creativecreatorormaybenot/subscriptions","organizations_url":"https://api.github.com/users/creativecreatorormaybenot/orgs","repos_url":"https://api.github.com/users/creativecreatorormaybenot/repos","events_url":"https://api.github.com/users/creativecreatorormaybenot/events{/privacy}","received_events_url":"https://api.github.com/users/creativecreatorormaybenot/received_events","type":"User","site_admin":false},"created_at":"2019-12-26T23:48:56Z","updated_at":"2019-12-26T23:48:56Z","author_association":"CONTRIBUTOR","body":"@chunhtai \r\n\r\nI am not sure where I used this, but sometimes you want to programmatically show a popup menu. This is also what the framework reflects today because [`showMenu`](https://api.flutter.dev/flutter/material/showMenu.html) exists on a global scope (as a function).  \r\nNow, if I want to show the same menu that would be displayed when a user **would tap** a `PopupMenuButton`, i.e. with the same values, same locations, etc., it would be extremely cumbersome (and unnecessary) to rewrite everything that is already done in [`_PopupMenuButtonState.showButtonMenu`](https://github.com/flutter/flutter/blob/1464eb8f5feb151520d163293fef290a962a0ac7/packages/flutter/lib/src/material/popup_menu.dart#L1088).\r\n\r\nAn example would be feature discovery: if you want to show what options a `PopupMenuButton` has to a user, you need to be able to either force them to tap the button, which would be weird, or open it programmatically for them, which is what this PR allows for."}}
other: {"actor":{"display_login":"creativecreatorormaybenot"}}