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

Index in builder function #5

Open
Mosc opened this issue Mar 21, 2022 · 3 comments
Open

Index in builder function #5

Mosc opened this issue Mar 21, 2022 · 3 comments

Comments

@Mosc
Copy link

Mosc commented Mar 21, 2022

I'd like to have access to an item's index in the builder function, in addition to the existing BuildContext and item T. If needed, I could offer this change myself in a PR. Let me know!

@knaeckeKami
Copy link
Owner

Hi!

having an index in the builder is a valid use case.
However, I intended this package to mostly be a minimal viable example of what diffutil_dart could be used for.
Looking at the popularity on pub.dev, it seems a few people do use it, and adding the index would be a breaking change.
I'm hesitant to go for that.

You're welcome to fork (it's just <200 lines of code anyway) or use any of the packages using diffutil_dart with more batteries included - like https://pub.dev/packages/great_list_view

@Mosc
Copy link
Author

Mosc commented Mar 21, 2022

Thanks for the quick response.

It would be a breaking change, but that's what semantic versioning is for, right? :) Of course, I fully understand if you don't want to commit to that, in which case a fork seems like a reasonable option.

I've had a look at great_list_view before, but it seemed incredibly daunting for the sliver use case, which would not be able to make use of the batteries included AutomaticAnimatedListView. Perhaps I should give it another shot.

@kmartins
Copy link

But when is removed item, this position is not will correspond list item by the position.

list[position] != item

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

3 participants