Skip to content
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

DataTable: missing secondary tap callback #116643

Closed
jpnurmi opened this issue Dec 7, 2022 · 3 comments · Fixed by #123036
Closed

DataTable: missing secondary tap callback #116643

jpnurmi opened this issue Dec 7, 2022 · 3 comments · Fixed by #123036
Assignees
Labels
a: desktop Running on desktop c: new feature Nothing broken; request for a new capability c: proposal A detailed proposal for a change to Flutter f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. P3 Issues that are less important to the Flutter project

Comments

@jpnurmi
Copy link
Member

jpnurmi commented Dec 7, 2022

Use case

Showing context menus on desktop platforms.

Currently, DataCell has onTap, onTapDown, onTapCancel, onLongPress, and onDoubleTap whereas DataRow only has a onLongPress gesture callback.

Proposal

Add onSecondaryTap(Down) to both DataRow and DataCell for showing row- and cell-specific context menus.

@danagbemava-nc danagbemava-nc added in triage Presently being triaged by the triage team c: new feature Nothing broken; request for a new capability framework flutter/packages/flutter repository. See also f: labels. f: material design flutter/packages/flutter/material repository. c: proposal A detailed proposal for a change to Flutter a: desktop Running on desktop and removed in triage Presently being triaged by the triage team labels Dec 8, 2022
@darrenaustin
Copy link
Contributor

cc @justinmc

@gspencergoog gspencergoog added the P3 Issues that are less important to the Flutter project label Dec 8, 2022
@justinmc
Copy link
Contributor

It would be nice if we could use composition to get these behaviors, but it seems impractical here, especially because DataCell and DataRow are not widgets. So, I think adding onSecondaryTap and onSecondaryTapDown to DataRow and DataCell makes sense.

Currently, DataCell uses Inkwell's GestureDetector under the hood:

And Inkwell doesn't have an onSecondaryTap parameter, I'm not sure why. We would need to either add it or wrap it in another GestureDetector there.

@github-actions
Copy link

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 github-actions bot locked as resolved and limited conversation to collaborators Apr 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a: desktop Running on desktop c: new feature Nothing broken; request for a new capability c: proposal A detailed proposal for a change to Flutter f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. P3 Issues that are less important to the Flutter project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants