From 3322a6c5b0aa99e255a9ef771d246eb84e3702df Mon Sep 17 00:00:00 2001 From: Juan Alvarez Date: Fri, 14 Jul 2023 15:16:38 -0500 Subject: [PATCH] added SwipeAnchor.none for disabling rotation --- lib/src/enum/swipe_anchor.dart | 1 + lib/src/swipable_stack.dart | 2 ++ 2 files changed, 3 insertions(+) diff --git a/lib/src/enum/swipe_anchor.dart b/lib/src/enum/swipe_anchor.dart index d4d64e7..7b65dd3 100644 --- a/lib/src/enum/swipe_anchor.dart +++ b/lib/src/enum/swipe_anchor.dart @@ -4,4 +4,5 @@ part of '../swipable_stack.dart'; enum SwipeAnchor { top, bottom, + none, } diff --git a/lib/src/swipable_stack.dart b/lib/src/swipable_stack.dart index 33feb27..48fed43 100644 --- a/lib/src/swipable_stack.dart +++ b/lib/src/swipable_stack.dart @@ -823,6 +823,8 @@ class _SwipablePositioned extends StatelessWidget { return angle; case SwipeAnchor.bottom: return -angle; + case SwipeAnchor.none: + return 0; case null: return _swipingTop ? -angle : angle; }