I am using ClickableListWheelView and I would like to add a notification to it, so I can check when the user starts/stops scrolling. For that I tried this inside _ClickableListWheelScrollViewState
's init
:
Got it from: https://stackoverflow.com/a/63675037/11968226
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
scrollCtrl.addListener(() {
print('scrolling');
});
scrollCtrl.position.isScrollingNotifier.addListener(() {
if(!scrollCtrl.position.isScrollingNotifier.value) {
print('scroll is stopped');
} else {
print('scroll is started');
}
});
});
But this is only printing "scrolling" but never "stop/start".
I do not want to wrap the view inside a NotificationListener
.
What am I missing here?