* Use `curly_braces_in_flow_control_structures` for `foundation`
* Use `curly_braces_in_flow_control_structures` for `gestures`
* Use `curly_braces_in_flow_control_structures` for `painting`
* Use `curly_braces_in_flow_control_structures` for `physics`
* fix comments
* remove trailing space
* fix TODO style
* Implement trackpad gestures in framework
* Touch and Pan/Zoom pointers have separate IDs now
* Handle trackpad pointer device type
* Respect supportedDevices for pan/zoom events
* Update after rebase
* Fix check failures
* Avoid error with very short drags
* Address feedback
* Refactor drag event handler
* Address more feedback
* Add some missing punctuation
Fixes test/gestures/long_press_test.dart of #85160
The LongPressGestureRecognizer in test 'non-allowed pointer does not inadvertently reset the recognizer' was not disposed breaking a lot of other tests.
Co-authored-by: Alexander Dahlberg <alexander.dahlberg@sigma.se>
The TapGestureRecognizer in the test named 'TapGestureRecognizer _sentTapDown toString' was not disposed, which was breaking a couple of other tests.
This worked fine when not shuffling the tests as the test was executed last.
This gesture recognizer can be used to recognize the classic
"onclick" behavior, where each tap in a series fires an event
with an incrementing "count" of how many taps have occurred
in series. This can in turn be used to build widgets that respond
to both tap and double-tap, or for widgets like the YouTube TV
player, where each subsequent tap in a series of >2 taps adjusts
the playhead another 15 seconds.
Fixes https://github.com/flutter/flutter/issues/81657
Some embeddings might send pointer events with buttons = 0x2 (right-click) for touch or stylus device kinds. If the primary button is synthesized for those events, they won't behave properly. Without this change it's not possible to trigger "secondary tap" events on a TapGestureRecognizer while using a stylus or on an iPad trackpad, since that recognizer will receive buttons = 0x3.
This turns on order shuffling for all tests that don't fail with it on, marking those tests that do fail with a tag so that they will be run without shuffling on.
To determine which tests fail with it on, I ran all the tests 100 times with different random shuffle seeds, and then also ran it with the date seeds from today until the end of July, and tagged all of the test suites (files) that fail, with a seed that caused them to fail.
* Gesture recognizer cleanup
1) Make OneSequenceGestureRecognizer.addAllowedPointer()
call startTrackingPointer(), and change subclasses to
call super.addAllowedPointer() in place of manually
calling startTrackingPointer().
2) Fix addAllowedPointer overrides to take PointerDownEvent
where some were taking PointerEvent.
3) Add API documentation to OneSequenceGestureRecognizer
4) Make the following fields in OneSequenceGestureRecognizer
private with public getters instead of publicly writable:
`state`, `primaryPointer`, and `initialPosition`.
5) Clean up gesture recognizer state in
OneSequenceGestureRecognizer.didStopTrackingLastPointer.
Fixes#81883
This adds support for GestureDetector.onLongPressDown and
GestureDetector.onLongPressCancel, allowing callers to register
interest in the initial pointer contact that might turn into
a long-press (and the associated cancel event if the gesture
loses).