EdsonBueno / infinite_scroll_pagination

Flutter package to help you lazily load and display pages of items as the user scrolls down your screen.
https://pub.dev/packages/infinite_scroll_pagination
MIT License
623 stars 210 forks source link

Introduce DiffUtil to compare each items before insert #229

Closed anderscheow closed 1 year ago

anderscheow commented 1 year ago

Currently it is possible to have duplicate items inside the listing. By introducing DiffUtil similar to Android DiffUtil, can prevent same items to be inserted to the listing.

clragon commented 1 year ago

There is no reason for this to be part of this package. If you wish to have a tool to compare you items before adding them to the controller, you can do so from the outside. There are also many other ways of comparing items in dart, like by overriding the comparison operator. This seems to be out of scope.