flutter scroll view when draggable item reaches edge code example
Example: flutter scroll view when draggable item reaches edge
//Works fine, although it is no very smooth
Listener(
child: draggable,
onPointerMove: (PointerMoveEvent event) {
if (event.position.dy > MediaQuery.of(context).size.height - 100) {
// 120 is height of your draggable.
scrollController.scrollTo(scrollcontroller.offset + 120);
}
},
);