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
441 stars 77 forks source link

Reset thumb position #55

Open dovahkiin98 opened 2 years ago

dovahkiin98 commented 2 years ago

I have a ListView and a DraggableScrollbar with it.

The page has Search. So this scenario happens.

The user scrolls to the middle of the page, and searches for an item. The list is filtered, but the thumb is still at the middle. Even if the user resets the list, the thumb is still at the middle.

I tried controller.jumpTo but that didn't change the thumb position.

Is there a way to control the thumb? Change its position or at least reset it along with the ListView?

dovahkiin98 commented 2 years ago

As it seems, the Thumb is changed depending on ScrollNotification, so it's not using the provided controller at all. Shouldn't it be using the ScrollController to listen to scroll changes?