-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Redo "Remove pressure customization from some pointer events" #30874
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
Redo "Remove pressure customization from some pointer events" #30874
Conversation
|
An event in |
…rt-30414-remove-hover-pressure
dkwingsmt
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.
Fixed the 2 issues
|
This has some merge conflicts now that need to be updated. |
…rt-30414-remove-hover-pressure
|
Is this waiting for a re-review? @Hixie @goderbauer @dkwingsmt |
Description
This PR removes parameter
pressurefrom the constructors of the following classes:PointerAddedEventPointerRemovedEventPointerHoverEventPointerEnterEventPointerExitEventSee belowPointerUpEventPointerCancelEventIt changes converter so that the aforementioned events will not be passed with
datum.pressure.It also changes
PointerEnterEvent.fromMouseEventandPointerExitEvent.fromMouseEventinto redirecting to their unnamed constructors, which drops the argumentsdownandpressurefrom the source event.For reasoning, migration, and discussion, see #30412.
About redo
A first attempt #30414 was found to break devicelab and was reverted. Through investigation, it was found out that events with
PointerChange.upcan also contain non-zero pressure (see touchEvents which are real recordings).As a fix,
PointerUpEventhas kept itspressureparameter, and will receivedatum.pressurewhen dispatched by event converter. Other changes are unchanged.I have tested all devicelabs on an android device and it has passed all tests.
Related Issues
Tests
It's not related to any tests.
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]). This will ensure a smooth and quick review process.///).flutter analyze --flutter-repo) does not report any problems on my PR.Breaking Change
Does your PR require Flutter developers to manually update their apps to accommodate your change?