Unverified Commit 3b19dfd4 authored by Todd Volkert's avatar Todd Volkert Committed by GitHub

Fix addAllowedPointer() overrides (#82834)

They should have been taking a PointerDownEvent.

This change was originally included in #81884, but that
had to be reverted because it broke Google testss. This
sub-part of that larger change needs to be made first in
order to allow for a phased rollout in a way that won't
break Google tests.

https://github.com/flutter/flutter/issues/81883
parent f512ebfd
......@@ -216,7 +216,7 @@ class ForcePressGestureRecognizer extends OneSequenceGestureRecognizer {
_ForceState _state = _ForceState.ready;
@override
void addAllowedPointer(PointerEvent event) {
void addAllowedPointer(PointerDownEvent event) {
// If the device has a maximum pressure of less than or equal to 1, it
// doesn't have touch pressure sensing capabilities. Do not participate
// in the gesture arena.
......
......@@ -262,7 +262,7 @@ abstract class DragGestureRecognizer extends OneSequenceGestureRecognizer {
}
@override
void addAllowedPointer(PointerEvent event) {
void addAllowedPointer(PointerDownEvent event) {
startTrackingPointer(event.pointer, event.transform);
_velocityTrackers[event.pointer] = velocityTrackerBuilder(event);
if (_state == _DragState.ready) {
......
......@@ -507,7 +507,7 @@ class MultiTapGestureRecognizer extends GestureRecognizer {
final Map<int, _TapGesture> _gestureMap = <int, _TapGesture>{};
@override
void addAllowedPointer(PointerEvent event) {
void addAllowedPointer(PointerDownEvent event) {
assert(!_gestureMap.containsKey(event.pointer));
_gestureMap[event.pointer] = _TapGesture(
gestureRecognizer: this,
......
......@@ -350,7 +350,7 @@ class ScaleGestureRecognizer extends OneSequenceGestureRecognizer {
}
@override
void addAllowedPointer(PointerEvent event) {
void addAllowedPointer(PointerDownEvent event) {
startTrackingPointer(event.pointer, event.transform);
_velocityTrackers[event.pointer] = VelocityTracker.withKind(event.kind);
if (_state == _ScaleState.ready) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment