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

Key on String instead of index int #101

Open
lukepighetti opened this issue Apr 20, 2023 · 1 comment
Open

Key on String instead of index int #101

lukepighetti opened this issue Apr 20, 2023 · 1 comment

Comments

@lukepighetti
Copy link

lukepighetti commented Apr 20, 2023

Matching on string will work for indexes, but it will also work for arbitrary tags such as 'target:foo'. Matching on index only works for numbers, and you end up having to maintain a map of string keys to fake indexes. This is for lists with dynamic length and widgets of dynamic height where the target may not yet be rendered because it's below the fold. Any feedback is appreciated!

@jerrywell
Copy link
Member

using numbers as key is because it will count on the order to forecast which direction and what distance we may move to. And the index is also matching the default sliver builder's index. if you use it for only few rows with dynamic height, you can use SingleChildScrollView with GlobalKey.

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

No branches or pull requests

2 participants