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
626 stars 213 forks source link

How to update existed item on list view? #238

Closed cogivn closed 1 year ago

cogivn commented 1 year ago

Hi,

Thank you for creating awesome library. I'm having a problem, how can i update item in specific page when using infinite_scroll_pagination

Ex: Page 0[Rambutan, Tomato, Pear] Page 1[Apple, Orange, Cherry] Page 2[Pipeapple, Mango, Melon]

Update Page 1[Apple, Banana, Cherry]

Thank you,

petodavid commented 1 year ago

How did you manage this? Update?

SebastienBtr commented 1 year ago

I would also like to have this feature

lukaskris commented 1 year ago

use this one i think it the only way to update an single item

pagingController.itemList = pagingController.itemList?.map((e) { if (e.postId == postId) { return e.copyWith( pollings: dataResult.pollings, votedId: dataResult.votedId); } else { return e; } }).toList();

but it will be janky if u turn on the transition