@@ -120,7 +120,7 @@ class IframeContentElement extends ReplacedElement {
120
120
: JavascriptMode .disabled,
121
121
navigationDelegate: navigationDelegate,
122
122
gestureRecognizers: {
123
- Factory (() => PlatformViewVerticalGestureRecognizer ())
123
+ Factory < VerticalDragGestureRecognizer > (() => VerticalDragGestureRecognizer ()),
124
124
},
125
125
),
126
126
);
@@ -372,42 +372,3 @@ ReplacedElement parseReplacedElement(
372
372
return EmptyContentElement (name: element.localName);
373
373
}
374
374
}
375
-
376
- // TODO(Sub6Resources): Remove when https://github.com/flutter/flutter/issues/36304 is resolved
377
- class PlatformViewVerticalGestureRecognizer
378
- extends VerticalDragGestureRecognizer {
379
- PlatformViewVerticalGestureRecognizer ({PointerDeviceKind kind})
380
- : super (kind: kind);
381
-
382
- Offset _dragDistance = Offset .zero;
383
-
384
- @override
385
- void addPointer (PointerEvent event) {
386
- startTrackingPointer (event.pointer);
387
- }
388
-
389
- @override
390
- void handleEvent (PointerEvent event) {
391
- _dragDistance = _dragDistance + event.delta;
392
- if (event is PointerMoveEvent ) {
393
- final double dy = _dragDistance.dy.abs ();
394
- final double dx = _dragDistance.dx.abs ();
395
-
396
- if (dy > dx && dy > kTouchSlop) {
397
- // vertical drag - accept
398
- resolve (GestureDisposition .accepted);
399
- _dragDistance = Offset .zero;
400
- } else if (dx > kTouchSlop && dx > dy) {
401
- // horizontal drag - stop tracking
402
- stopTrackingPointer (event.pointer);
403
- _dragDistance = Offset .zero;
404
- }
405
- }
406
- }
407
-
408
- @override
409
- String get debugDescription => 'horizontal drag (platform view)' ;
410
-
411
- @override
412
- void didStopTrackingLastPointer (int pointer) {}
413
- }
0 commit comments