I want to detect vertical end of dragging of a CustomScrollView
what I did was something like this:
GestureDetector(
onVerticalDragEnd: (details) {}
child: CustomScrollView(...)
);
but it's not working, it seems like these two widgets have conflicts, I'm looking for a workaround with this issue
Using a
GestureDetector
is not the correct way, here is a way of triggering a method when you stop dragging your scroll view:Simply wrap your scroll view inside a
NotificationListener
widget then you will be able to get any notification from your scroll view and you only need to manage your action depending on the notification's type. (I returnfalse
at the end ofonNotification
to keep listening to upcoming notification.)Test the full code on DartPad