-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request] Ability to provide a label text builder #2
Comments
Could this be something that was added after I copied that code? |
I don’t think so, their codebase has not undergone any changes in over a year. |
Passing the builder is relatively straightforward but what shall we do with the label text in the end? |
Pass it on to the |
Yep, but the question is how to render it? Now I can see, this is something I was probably glad to remove in the first place. :-) |
I haven't explored the code completely, but it should be possible to render a label next to the thumb in |
You probably also need the |
I have a feeling now that it would be much cleaner to just build extra thumbs that contain a text as well as a shape, rather than using the existing thumbs and injecting an extra text beside them... I mean, instead of using |
That sounds great. If you could pass the |
I uploaded something, there could be something like this:
Of course, this is ugly, puts the whole package to the left (axis alignments are lacking) and the label is nothing to write home about, just food for thought. If you come up with a nice one, we can put it into there. |
This works quite well! I will think about ways to generalize it, although I'm happy with how extensible the thumb-builder is right now. Follow up question, is there any reason why you haven't reused the flutter-draggable-scrollbar out of the box? I'm curious because there are certain niceties there like the scroll thumb animations (fade-in and fade-out), that are missing here. |
Yes, very probably there was, just that I can't recall it any more after some months. :-) I had to modify it too heavily, probably to introduce some extra communication that binds the list and the scrollbar together. The base problem is that the |
Hey @deakjahn, thanks again for the changes. But the I was wondering if the |
In theory, it looks freshly obtained on every frame. I never used your approach to add a label, I actually have a large first letter display in the background of my dictionary display but I didn't notice any problems with that. When do you experience slateness? On manual scrolling or during some other operations? |
The issue happens on scrolling up and down with either the dragbar and or the scroll-view. If you're curious, you could check out the app here: https://github.com/ente-io/frame/tree/smooth_scroll From the debugger, it seems that |
But: |
Yes, |
Yep, I understand, still |
Hey, I’m stuck on some other tasks. I’ll reopen this issue after digging in more. Thanks! |
Firstly, thanks for the great library, it has been a blessing!
Now, while using the
DraggableScrollbar
, I'd like to provide a label text next to the "thumb".The original library exposes a
labelTextBuilder
which does this. Would it be possible for you to expose something similar?Thanks again!
The text was updated successfully, but these errors were encountered: