Skip to content

Commit 1878b61

Browse files
committed
(cherry picked from commit 54161cc)
1 parent 92e2493 commit 1878b61

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

Diff for: lib/src/gesture_detector.dart

+12-10
Original file line numberDiff line numberDiff line change
@@ -56,16 +56,18 @@ class _SlidableGestureDetectorState extends State<SlidableGestureDetector> {
5656
Widget build(BuildContext context) {
5757
final canDragHorizontally = directionIsXAxis && widget.enabled;
5858
final canDragVertically = !directionIsXAxis && widget.enabled;
59-
return GestureDetector(
60-
onHorizontalDragStart: canDragHorizontally ? handleDragStart : null,
61-
onHorizontalDragUpdate: canDragHorizontally ? handleDragUpdate : null,
62-
onHorizontalDragEnd: canDragHorizontally ? handleDragEnd : null,
63-
onVerticalDragStart: canDragVertically ? handleDragStart : null,
64-
onVerticalDragUpdate: canDragVertically ? handleDragUpdate : null,
65-
onVerticalDragEnd: canDragVertically ? handleDragEnd : null,
66-
behavior: HitTestBehavior.opaque,
67-
dragStartBehavior: widget.dragStartBehavior,
68-
child: widget.child,
59+
return ClipRRect(
60+
child: GestureDetector(
61+
onHorizontalDragStart: canDragHorizontally ? handleDragStart : null,
62+
onHorizontalDragUpdate: canDragHorizontally ? handleDragUpdate : null,
63+
onHorizontalDragEnd: canDragHorizontally ? handleDragEnd : null,
64+
onVerticalDragStart: canDragVertically ? handleDragStart : null,
65+
onVerticalDragUpdate: canDragVertically ? handleDragUpdate : null,
66+
onVerticalDragEnd: canDragVertically ? handleDragEnd : null,
67+
behavior: HitTestBehavior.opaque,
68+
dragStartBehavior: widget.dragStartBehavior,
69+
child: widget.child,
70+
),
6971
);
7072
}
7173

0 commit comments

Comments
 (0)