fluttercommunity / fluttercommunity/flutter-draggable-scrollbar

BUG: Multiple scrollable widget

Open
#28 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Dart
Stars
442
Forks
72
PR merge metrics
No merged PRs in 30d

Description

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](https://user-images.githubusercontent.com/18382875/81580376-a5e38c80-93ad-11ea-9376-007c6e4fd1fc.png)

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](https://user-images.githubusercontent.com/18382875/81580579-e6dba100-93ad-11ea-96ae-3947d4400d76.png)

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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.