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

Differences to slightfoot/flutter_sticky_headers #1

Closed
levrik opened this issue Jun 18, 2018 · 3 comments
Closed

Differences to slightfoot/flutter_sticky_headers #1

levrik opened this issue Jun 18, 2018 · 3 comments
Labels
question Further information is requested

Comments

@levrik
Copy link

levrik commented Jun 18, 2018

What are the actual differences to slightfoot/flutter_sticky_headers in the implementation? Which implementation is better?

Would be nice to get a few questions answered that help picking one of the two libraries :)

@letsar letsar added the question Further information is requested label Jun 18, 2018
@letsar
Copy link
Owner

letsar commented Jun 18, 2018

Hi @levrik! This is a very good question.
The difference is in the kind of widgets you want to put as a child:
The slightfoot/flutter_sticky_headers wants a RenderBox as a child while this package wants a RenderSliver.

For example the Column widget renders a RenderBox, whereas the SliverList renders a RenderSliver.
So the Column widget will work with the slightfoot/flutter_sticky_headers but not the SliverList.

With this package you can do both 😉!

What 😯? I said that this package wants a RenderSliver and the Column widget does not provide one! Yes that's true, but with the SliverToBoxAdapter widget you can put a RenderBox element in it and it will be rendered as a RenderSliver 😲!

So if you use this package you can do both 😃!

Moreover, the intended use of headers is typically for lists with a lot of items. And for lists, the SliverList is a better choice than a Column.

If this answer explains in an understandable way the difference, I will put it in the README, to help people to choose 😉.

@tamoyal
Copy link

tamoyal commented Jan 5, 2019

@letsar This was helpful for me and I think belongs in the README with potentially some elaboration on why this will perform better on big lists.

@pkitatta
Copy link

Was helpful thanks. Being new to flutter sometime you can know the advantages.

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

No branches or pull requests

4 participants