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

add horizontal scrollbar support #21

Open GAM3RG33K opened 5 years ago

GAM3RG33K commented 5 years ago

add horizontal scrollbar support in the library and a demo tab in the example app.

Screenshots attached for details Screenshot_1569633376 Screenshot_1569633370

GAM3RG33K commented 5 years ago

@marica27 This is my first pull request, so can you just check it out and let me know? Thanks in advance.

rayliverified commented 4 years ago

What is the status on the PR? I would like to use a draggable horizontal scrollbar in my project.

emvaized commented 4 years ago

By the way, you forgot to modify SlideTransition, so that when child is horizontal, scrollbar pulp should go down on dissapearing, and not to the side.

To fix this you should make SlideFadeTransition accept isVertical parameter as well, and inside build method:

...
position: Tween(
          begin: Offset(isVertical ? 0.3 : 0.0, isVertical ? 0.0 : 0.3),
...
GAM3RG33K commented 4 years ago

@emvaized That's right. I don't know how it got out of my attention. I will fix it soon. Thanks for pointing it out.