233 Commits

Author SHA1 Message Date
Pierre-Louis
9cc72df781
Use curly_braces_in_flow_control_structures for foundation, gestures, painting, physics (#104610)
* 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
2022-05-25 19:55:22 +02:00
Michael Goderbauer
d5fbc3750e
Remove unused code from tests (#104550) 2022-05-25 09:38:09 -07:00
Phil Quitslund
bca071815f
rename local functions with _s (#102615) 2022-04-27 09:14:57 -07:00
Michael Goderbauer
51bcdb9407
super parameters for framework (#100905) 2022-04-13 22:38:40 -07:00
Callum Moffat
30a501801a
Support trackpad gestures in framework (#89944)
* 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
2022-04-12 19:47:01 -07:00
Michael Goderbauer
a01424773e
Enable unnecessary_import (#101600) 2022-04-08 12:56:45 -07:00
Jonah Williams
8e6d57b773
[framework] add gesture settings to draggable (#99567) 2022-03-04 15:46:21 -08:00
Michael Goderbauer
7f2c1cd772
Use PlatformDispatcher.instance over window where possible (#99496) 2022-03-03 14:46:16 -08:00
Jonah Williams
e25670a2a0
[framework] Provide gesture settings to regular gesture detectors (#99081) 2022-02-24 20:41:12 -08:00
wangying
499e900e39
Fix timer keeps active when resampling disabled in some cases (#97197) 2022-02-09 02:25:06 -08:00
Ian Hickson
ab89ce285f
Clean up the bindings APIs. (#89451) 2022-02-03 14:55:15 -08:00
chunhtai
e912b91c5f
Add Supported devices to the TapGestureRecognizer (#96560) 2022-01-13 12:37:33 -08:00
Ian Hickson
61a0add286
Enable avoid_redundant_argument_values lint (#91409) (#91462) 2021-10-08 09:25:14 -07:00
Zachary Anderson
b9d2177da0
Revert "Enable avoid_redundant_argument_values lint (#91409)" (#91461)
This reverts commit 5fd259be244244e14ff87fee9b6a721625f952cd.
2021-10-07 21:11:07 -07:00
Ian Hickson
5fd259be24
Enable avoid_redundant_argument_values lint (#91409) 2021-10-07 20:13:02 -07:00
Alexander Dahlberg
60ed5cc8e4
Fixed leak and removed no-shuffle tag in long_press_test.dart (#88373)
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.
2021-08-23 10:02:21 -07:00
Swiftaxe
2f46d36bf4
Fixed leak and removed no-shuffle tag in test/gestures/tap_test.dart (#88342) 2021-08-17 10:07:05 -07:00
Swiftaxe
e7f9bcba2d
Removed no-shuffle tag and fixed leak in debug_test.dart (#88268)
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.
2021-08-16 09:29:19 -07:00
Justin McCandless
4bd8b288bb
ScaleUpDetails focalPointDelta (#85718)
Corrects the exact definition in code and docs of ScaleUpDetails delta.
2021-08-12 18:02:02 -07:00
Jonah Williams
5792c7347c
Use Device specific gesture configuration for scroll views (#87604) 2021-08-09 10:50:02 -07:00
Todd Volkert
6490a4e942
Add SerialTapGestureRecognizer (#83082)
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
2021-08-04 12:12:38 -07:00
Darren Austin
05e8425427
Update the skipped test for gestures. (#87130) 2021-07-27 15:59:28 -07:00
Greg Spencer
738ce43d97
Randomize tests, exclude tests that fail with randomization. (#86793)
* Randomize tests, exclude tests that fail with randomization.

* Disable some more tool tests
2021-07-26 23:40:49 -07:00
Callum Moffat
6909c544d5
Don't synthesize primary pointer button unless buttons = 0 (#85808)
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.
2021-07-19 12:48:17 -07:00
Ren You
3dea9f0251
Revert "Clean up the bindings APIs (#86438)" (#86484)
This reverts commit d056500bfe6a712cdace450d06c4a8fb2290e63a.
2021-07-15 09:29:16 -07:00
Ian Hickson
d056500bfe
Clean up the bindings APIs (#86438) 2021-07-14 14:41:24 -07:00
Zachary Anderson
7f741e9181
Revert "Clean up the bindings APIs (#86388)" (#86404)
This reverts commit 31de052e3fddb4909ff88172a6937db7f3dc49db.
2021-07-13 21:32:29 -07:00
Ian Hickson
31de052e3f
Clean up the bindings APIs (#86388) 2021-07-13 18:31:11 -07:00
Ian Hickson
c800b9c3e4
Revert "Clean up the bindings APIs (#83843)" (#86386)
This reverts commit e2490f2906060d0aaecbbe34a9240ca3d54ef998.
2021-07-13 15:47:40 -07:00
Ian Hickson
e2490f2906
Clean up the bindings APIs (#83843) 2021-07-13 12:41:03 -07:00
Greg Spencer
6adea05276
Revert "Randomize Framework tests, opt out some tests that currently fail. (#85159)" (#85673)
This reverts commit b5f9612 because it is taking about 40% longer to run the tests, which is causing timeouts.
2021-06-30 19:38:09 -07:00
Justin McCandless
568ea46250
Add delta param to scaleupdate so it matches dragupdate (#85009) 2021-06-30 16:56:03 -07:00
Greg Spencer
b5f9612cac
Randomize Framework tests, opt out some tests that currently fail. (#85159)
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.
2021-06-29 13:46:13 -07:00
Greg Spencer
1ac209c222
Turn on avoid_dynamic_calls lint, make appropriate changes. (#84478) 2021-06-23 16:36:03 -07:00
Anis Alibegić
c99ed373b3
Fixed large amount of spelling errors (#83744) 2021-06-02 10:14:06 -07:00
Ian Hickson
5e0cc4cba4
Migrate to ChannelBuffers.push (#82564) 2021-05-21 15:09:03 -07:00
Todd Volkert
1cf492f254
Re-apply "Gesture recognizer cleanup" (#82885)
This is a re-application of https://github.com/flutter/flutter/pull/81884,
but with https://github.com/flutter/flutter/pull/82834 landed first.

Fixes https://github.com/flutter/flutter/issues/81883
2021-05-19 16:32:15 -07:00
Hattomo (TomohiroHattori)
08a70e7ac8
Enable avoid_escaping_inner_quotes lint (#81153) 2021-05-19 09:54:02 -07:00
Tong Mu
4c1709642a
Drag gesture recognizer accepts all pointers when any pointer is accepted (#82786) 2021-05-18 20:39:05 -07:00
Todd Volkert
3fc408200e
Revert "Gesture recognizer cleanup (#81884)" (#82831)
This reverts commit e88a387b26b097d8516c92babe1287edede79206.
2021-05-18 09:50:24 -07:00
Todd Volkert
e88a387b26
Gesture recognizer cleanup (#81884)
* 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
2021-05-17 16:53:49 -07:00
Ian Hickson
2ae1e39810
Revert "Migrate to ChannelBuffers.push (#82057)" (#82525) 2021-05-14 12:09:03 -07:00
xubaolin
ea09f4ecbc
update the DragStartBehavior documetations (#82327) 2021-05-14 00:09:02 -07:00
Ian Hickson
b86d5c0094
Migrate to ChannelBuffers.push (#82057) 2021-05-13 14:34:04 -07:00
Abhishek Ghaskata
254c9f1755
Enable use_named_constants_lint (#82426) 2021-05-13 13:29:06 -07:00
Kate Lovett
e74c15cac4
Deprecate GestureDetector.kind in favor of new supportedDevices (#81858) 2021-05-07 14:24:03 -07:00
Ren You
7f1d1414cc
Revert "Migrate to ChannelBuffers.push (#81235)" (#81829)
This reverts commit 35ad43f20caa71ec051a97bc8bc8fec552fb4452.
2021-05-04 06:17:19 -07:00
Ian Hickson
35ad43f20c
Migrate to ChannelBuffers.push (#81235) 2021-05-03 17:14:03 -07:00
Jonah Williams
fff8ecfb94
[flutter] reject mouse drags by default in scrollables (#81569) 2021-05-03 16:54:02 -07:00
Todd Volkert
91de4bd3e3
Add onLongPressDown, onLongPressCancel (#81260)
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).
2021-04-28 12:51:27 -07:00