From c133002118a126774758bfaa145ca94d1eae4627 Mon Sep 17 00:00:00 2001 From: Sahil Kumar Date: Tue, 8 Dec 2020 17:01:29 +0530 Subject: [PATCH] [Swipeable] Allow widget to swipe backward Signed-off-by: Sahil Kumar --- lib/src/swipeable.dart | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/src/swipeable.dart b/lib/src/swipeable.dart index bdaf6993..d56a8e24 100644 --- a/lib/src/swipeable.dart +++ b/lib/src/swipeable.dart @@ -70,13 +70,11 @@ class _SwipeableState extends State with TickerProviderStateMixin { } void _handleDragUpdate(DragUpdateDetails details) { - print(_moveAnimation.value.dx); - final delta = details.primaryDelta; - if (delta.isNegative) return; - _dragExtent += delta; + if (_dragExtent.isNegative) return; + var movePastThresholdPixels = widget.threshold; var newPos = _dragExtent.abs() / context.size.width;