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
612 stars 202 forks source link

How can I update specific item's widget when itemList is set with new values? #260

Closed bizk-sato closed 11 months ago

bizk-sato commented 1 year ago
  final PagingController<int, Item> _pagingController = PagingController(firstPageKey: 0);

  // first calling of setter
  // build the widget for the first time
  _pagingController.itemList = [ {"id": 1, "content": "none" }, { "id": 2, "content": "none" }]

  // second calling of setter
  // two widgets are displayed
  // I don't need to update the widget of item which id is 1 because the data is not changed. But when I use the itemList setter function, it updates all.  
  _pagingController.itemList = [ {"id": 1, "content": "none" }, { "id": 2, "content": "this field was updated" }]

So I want to update only item which id is 2 for the second calling of itemList setter. Is there any way to achieve this?

clragon commented 1 year ago

this is not an issue with this package. if you need help with flutter in general, you can visit the community: https://flutter.dev/community