Fix semantic issue with vertical swipe controller

This commit is contained in:
Shawn 2022-09-20 14:55:01 -06:00
parent b2a6990fd8
commit 5b12c5ccb3

View File

@ -53,18 +53,14 @@ class _VerticalSwipeController {
} }
/// Utility method to wrap a gesture detector and wire up the required handlers. /// Utility method to wrap a gesture detector and wire up the required handlers.
Widget wrapGestureDetector(Widget child, {Key? key}) => Semantics( Widget wrapGestureDetector(Widget child, {Key? key}) => GestureDetector(
button: false,
child: GestureDetector(
key: key, key: key,
onTapDown: (_) { excludeFromSemantics: true,
handleTapDown(); onTapDown: (_) => handleTapDown(),
},
onTapUp: (_) => handleTapCancelled(), onTapUp: (_) => handleTapCancelled(),
onVerticalDragUpdate: handleVerticalSwipeUpdate, onVerticalDragUpdate: handleVerticalSwipeUpdate,
onVerticalDragEnd: (_) => handleVerticalSwipeCancelled(), onVerticalDragEnd: (_) => handleVerticalSwipeCancelled(),
onVerticalDragCancel: handleVerticalSwipeCancelled, onVerticalDragCancel: handleVerticalSwipeCancelled,
behavior: HitTestBehavior.translucent, behavior: HitTestBehavior.translucent,
child: child), child: child);
);
} }