From 5b12c5ccb37b2c891a103e09686fca2754a419e1 Mon Sep 17 00:00:00 2001 From: Shawn Date: Tue, 20 Sep 2022 14:55:01 -0600 Subject: [PATCH] Fix semantic issue with vertical swipe controller --- .../home/_vertical_swipe_controller.dart | 24 ++++++++----------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/lib/ui/screens/home/_vertical_swipe_controller.dart b/lib/ui/screens/home/_vertical_swipe_controller.dart index d513e8ac..7dc405ae 100644 --- a/lib/ui/screens/home/_vertical_swipe_controller.dart +++ b/lib/ui/screens/home/_vertical_swipe_controller.dart @@ -53,18 +53,14 @@ class _VerticalSwipeController { } /// Utility method to wrap a gesture detector and wire up the required handlers. - Widget wrapGestureDetector(Widget child, {Key? key}) => Semantics( - button: false, - child: GestureDetector( - key: key, - onTapDown: (_) { - handleTapDown(); - }, - onTapUp: (_) => handleTapCancelled(), - onVerticalDragUpdate: handleVerticalSwipeUpdate, - onVerticalDragEnd: (_) => handleVerticalSwipeCancelled(), - onVerticalDragCancel: handleVerticalSwipeCancelled, - behavior: HitTestBehavior.translucent, - child: child), - ); + Widget wrapGestureDetector(Widget child, {Key? key}) => GestureDetector( + key: key, + excludeFromSemantics: true, + onTapDown: (_) => handleTapDown(), + onTapUp: (_) => handleTapCancelled(), + onVerticalDragUpdate: handleVerticalSwipeUpdate, + onVerticalDragEnd: (_) => handleVerticalSwipeCancelled(), + onVerticalDragCancel: handleVerticalSwipeCancelled, + behavior: HitTestBehavior.translucent, + child: child); }