I have this UI:
When user taps on right side we go to the next story, left we go to previous and holding down anywhere should stop the automatic loading on top. I am currently using GestureDetectors and using the three callbacks
onTapTo go to next or previous storyonTapDownTo pause the loaderonTapUpTo resume the loader
The problem is onTap gets called with onTapUp so when I try to pause for example by holding down on the right side, it would immediately go to the next story after I lift my finger.

Let's try the below solution, I tested it and it works quite well in your case.
Below is a custom
GestureDetectorwidget that allows us to set the duration foronLongPressStartandonLongPressEndAnd the usage of the custom widget