Skip to content
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

support nested scroll view #88

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

edingroot
Copy link

@edingroot edingroot commented Apr 18, 2022

Hi!

I did some small changes to support nested scroll view, i.e. scrollable parent with non-scrollable list view children. Also added a demo in the sample app.

Please kindly help to review and let me know if it is inappropriate, thank you!

Some related issues: #22 #23 #49 #89

@edingroot
Copy link
Author

edingroot commented Apr 23, 2022

Hi @henrichen, Could you please kindly review my changes when you have time? Thanks :)

@MiniSuperDev
Copy link

Hi, I try your branch to create a bidirectional lazy load list like this #89
The idea is use center key like flutter docs said
https://github.com/flutter/flutter/blob/5464c5bac742001448fe4fc0597be939379f88ea/packages/flutter/lib/src/widgets/scroll_view.dart#L502-L513

I create a gist where you can enable a disable the center key, and you can see that only highlight work, but the scroll to not work when the center key is enable.

how can I keep the scroll to index behavior while have the center key? or maybe do you know other way to create a list that append items to the top of the list by preserving the scroll, the solution that I used is from flutter/flutter#21541 (comment)

thank you

Copy link

@mbfakourii mbfakourii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It worked very well in lazy-loading with two SliverLists in reverse mode

@LinXunFeng
Copy link

Maybe you can try using the flutter_scrollview_observer package : )

@khomin
Copy link

khomin commented Jul 29, 2023

Hi, I try your branch to create a bidirectional lazy load list like this #89 The idea is use center key like flutter docs said https://github.com/flutter/flutter/blob/5464c5bac742001448fe4fc0597be939379f88ea/packages/flutter/lib/src/widgets/scroll_view.dart#L502-L513

I create a gist where you can enable a disable the center key, and you can see that only highlight work, but the scroll to not work when the center key is enable.

how can I keep the scroll to index behavior while have the center key? or maybe do you know other way to create a list that append items to the top of the list by preserving the scroll, the solution that I used is from flutter/flutter#21541 (comment)

thank you

I tried with two SliverList + center key
not working same way as the original code

And please could you add in the description - that is a very basic library without support SliverList etc not for serious projects
People are wasting their time trying it
Because this library is somehow in the top

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants