From 035b8e6293b93d99705af35d227841722a71bc3b Mon Sep 17 00:00:00 2001 From: Ronak99 Date: Mon, 16 Feb 2026 18:50:54 +0530 Subject: [PATCH 1/2] feat: added onSlideAnimationChanged callback --- lib/src/slidable.dart | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/src/slidable.dart b/lib/src/slidable.dart index a0a3804..6ba1e5c 100644 --- a/lib/src/slidable.dart +++ b/lib/src/slidable.dart @@ -28,12 +28,15 @@ class Slidable extends StatefulWidget { this.direction = Axis.horizontal, this.dragStartBehavior = DragStartBehavior.down, this.useTextDirection = true, + this.onSlideAnimationChanged, required this.child, }); /// The Slidable widget controller. final SlidableController? controller; + final Function(Animation animation)? onSlideAnimationChanged; + /// Whether this slidable is interactive. /// /// If false, the child will not slid to show actions. @@ -214,6 +217,9 @@ class _SlidableState extends State : Offset(0, end), ), ); + if (widget.onSlideAnimationChanged != null) { + widget.onSlideAnimationChanged!(moveAnimation); + } } Widget? get actionPane { From d464ce7e31dd233ecc574fb60737209b7d6137f0 Mon Sep 17 00:00:00 2001 From: Ronak99 Date: Mon, 16 Feb 2026 18:57:57 +0530 Subject: [PATCH 2/2] chore: comment --- lib/src/slidable.dart | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/src/slidable.dart b/lib/src/slidable.dart index 6ba1e5c..cf5f297 100644 --- a/lib/src/slidable.dart +++ b/lib/src/slidable.dart @@ -35,6 +35,7 @@ class Slidable extends StatefulWidget { /// The Slidable widget controller. final SlidableController? controller; + /// A callback that is called when the slide animation changes. final Function(Animation animation)? onSlideAnimationChanged; /// Whether this slidable is interactive.