Skip to content

Commit 29668fb

Browse files
committed
Remove unnecessary code
1 parent 86ac375 commit 29668fb

File tree

1 file changed

+1
-40
lines changed

1 file changed

+1
-40
lines changed

lib/src/replaced_element.dart

Lines changed: 1 addition & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ class IframeContentElement extends ReplacedElement {
120120
: JavascriptMode.disabled,
121121
navigationDelegate: navigationDelegate,
122122
gestureRecognizers: {
123-
Factory(() => PlatformViewVerticalGestureRecognizer())
123+
Factory<VerticalDragGestureRecognizer>(() => VerticalDragGestureRecognizer()),
124124
},
125125
),
126126
);
@@ -372,42 +372,3 @@ ReplacedElement parseReplacedElement(
372372
return EmptyContentElement(name: element.localName);
373373
}
374374
}
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

Comments
 (0)