fluttercommunity / flutter-draggable-scrollbar

Draggable Scrollbar - A scrollbar that can be dragged for quickly navigation through a vertical list. Additional option is showing label next to scrollthumb with information about current item. Maintainer: @marica27
https://pub.dev/packages/draggable_scrollbar
MIT License
442 stars 77 forks source link

BUG: Multiple scrollable widget #28

Open ImDeZz opened 4 years ago

ImDeZz commented 4 years ago

Hi

I had to use the package on Flutter Web, but my application had multiple other scrollable widgets inside the DraggableScrollbar.

Those scrollables were not messing with eachother and were working properly, except for the scrollthumb, which moved automatically when the Carousel did, and automatically when the vertical ListView was scrolled.

I took a look into the code, and found a bug inside, and fixed it. The problem was, that the thumb was moved by every ScrollNotification, and not just by its own controller's.

image

Proposed solution: Filter only the local notifications, with the notification depth of 0, and do not move the thumb, when the notification comes from a remote notification.

image

This has fixed it for me. Thank you for the package.