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
Material Desktop Context Menu #74286
Material Desktop Context Menu #74286
Conversation
43f1f13
to
4e435a4
Compare
// * [CupertinoDesktopTextSelectionToolbar], which uses this to position itself. | ||
// * [TextSelectionToolbarLayoutDelegate], which does a similar layout for | ||
// the mobile text selection toolbars. | ||
class _DesktopTextSelectionToolbarLayoutDelegate extends SingleChildLayoutDelegate { |
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.
I moved this into its own file and made it public in order to share it with the Mac and Material desktop context menus.
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
I am still confused as to how to use this. @justinmc are there full examples explaining usage? I have never seen this in a Flutter app. From the docs, I am not sure how to use it.
It sounds like it should appear on right click by default but it does not. |
This should show up by default on desktop, but only when right clicking on EditableText-based widgets. Right clicking elsewhere does nothing, for now. This is also purposely not customizable or reusable for now. It was a temporary solution that we plan to expand on. |
@justinmc Thanks. Does the first part mean that it does not show up on web? |
Yeah that's right. Web will still show the browser's right click menu. |
A desktop right-click menu for Windows and Linux, in a Material-esque style.
This is branched off of #73882 and needs to wait for that to be merged first.See the list of known limitations tracked in #74255.
Closes #31955