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

get the number of pointers in ScaleGestureRecognizer's handleEvent #127309

Closed
2 tasks done
kseino opened this issue May 22, 2023 · 3 comments
Closed
2 tasks done

get the number of pointers in ScaleGestureRecognizer's handleEvent #127309

kseino opened this issue May 22, 2023 · 3 comments
Labels
c: new feature Nothing broken; request for a new capability c: proposal A detailed proposal for a change to Flutter f: gestures flutter/packages/flutter/gestures repository. framework flutter/packages/flutter repository. See also f: labels. P3 Issues that are less important to the Flutter project waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds

Comments

@kseino
Copy link
Contributor

kseino commented May 22, 2023

Is there an existing issue for this?

Use case

we have a use case to handle pointer event, depending on the number of pointers in the ScaleGestureRecognizer's handleEvent.
do we have any way to get the number of pointers?

class CustomScaleGestureRecognizer extends ScaleGestureRecognizer {
  @override void handleEvent(PointerEvent event) {
    super.handleEvent(event);
    // handle only when two-fingered.
  }
}

Proposal

class CustomScaleGestureRecognizer extends ScaleGestureRecognizer {
  @override void handleEvent(PointerEvent event) {
    super.handleEvent(event);
    if (pointerCount == 2) {
      // do something
    }
  }
}
@darshankawar darshankawar 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: gestures flutter/packages/flutter/gestures repository. c: proposal A detailed proposal for a change to Flutter and removed in triage Presently being triaged by the triage team labels May 22, 2023
@goderbauer
Copy link
Member

we have a use case to handle pointer event, depending on the number of pointers in the ScaleGestureRecognizer's handleEvent.

Can you describe what that use case is?

@goderbauer goderbauer added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label May 30, 2023
@goderbauer goderbauer added the P6 label Jun 6, 2023
@github-actions
Copy link

Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now.
If you find this problem please file a new issue with the same description, what happens, logs and the output of 'flutter doctor -v'. All system setups can be slightly different so it's always better to open new issues and reference the related ones.
Thanks for your contribution.

@flutter-triage-bot flutter-triage-bot bot added P3 Issues that are less important to the Flutter project and removed P6 labels Jun 28, 2023
@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 Jul 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
c: new feature Nothing broken; request for a new capability c: proposal A detailed proposal for a change to Flutter f: gestures flutter/packages/flutter/gestures repository. framework flutter/packages/flutter repository. See also f: labels. P3 Issues that are less important to the Flutter project waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds
Projects
None yet
Development

No branches or pull requests

3 participants