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

[Proposed change] Possible to make the function generic so the list does not have to extend BoxScrollView? #40

Closed ngxingyu closed 4 years ago

ngxingyu commented 4 years ago

I wanted to use this with ImplicitlyAnimatedReorderableList, but that widget does not extend BoxScrollView which is needed by the draggable scrollbar. Would converting the DraggableScrollbar class into a generic class work for this widget?

class DraggableScrollbar<T> extends StatefulWidget { /// The view that will be scrolled with the scroll thumb final T child;

To use: DraggableScrollbar<ImplicitlyAnimatedReorderableList>

ngxingyu commented 4 years ago

It doesn't work -.-