From 5efbfb852802ec16aefc6854865912479c730236 Mon Sep 17 00:00:00 2001 From: Raj Date: Wed, 8 Nov 2023 13:32:03 +0530 Subject: [PATCH] Box Controller Drag update handle --- lib/src/flutter_sliding_box.dart | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/src/flutter_sliding_box.dart b/lib/src/flutter_sliding_box.dart index 7f4aeec..a1381be 100644 --- a/lib/src/flutter_sliding_box.dart +++ b/lib/src/flutter_sliding_box.dart @@ -988,6 +988,16 @@ class BoxController extends ValueNotifier { _boxState = boxState; } + /// Handles when a new position is passed as a drag externally + void onDragUpdate(double dy) { + _boxState?._onGestureUpdate(dy); + } + + /// Handles when drag end event is passed as a drag externally + void onDragEnd(Velocity v) { + _boxState?._onGestureEnd(v); + } + /// Determine if the [SlidingBox.controller] is attached to an instance of the /// [SlidingBox] (this property must be true before any other [BoxController] /// functions can be used)