Closed bizk-sato closed 1 year ago
Same here! @EdsonBueno
Not sure if you've tried this yet @bizk-sato, but this works for me:
_pagingController.itemList.remove(object);
In this case the object is just a record/document that I've retrieved from firebase. Let me know if this helps!
Not sure if you've tried this yet @bizk-sato, but this works for me:
_pagingController.remove(object);
In this case the object is just a record/document that I've retrieved from firebase. Let me know if this helps!
PagingController does not have remove
method, at least in version 3.2.0.
Apologies! I meant:
_pagingController.itemList.remove(object);
I've updated my other reply.
Oh ok. I just tested it and also requires the user to scroll.
Please provide a code to reproduce the problem.
I have same question, then I try this, it's work for me.
void removePageItem(E element){
_pagingController.itemList?.remove(element);
_pagingController.appendLastPage([]); // tigger notify
}
remove
The code does not look elegant, but it works.
Thanks
I have same question, then I try this, it's work for me.
void removePageItem(E element){ _pagingController.itemList?.remove(element); _pagingController.appendLastPage([]); // tigger notify }
Maybe this could be better since the old method won't update the next page anymore.
void removePageItem(E element){
controller.pagingController.itemList?.remove(element);
controller.pagingController.appendPage(<E>[],0); // tigger notify but still can load the nextPage
}
0 is my set initial page number, if your's is 1 then that's 1.
I want to remove an item from the list.
Tried these 2 options below suggested in #18 but they didn't work. I had to scroll the list manually, and then it was removed. I don't want users to scroll manually to remove an item.
Option 1
final newList = List.of(_pagingController.itemList); newList.removeWhere(...); _pagingController.itemList = newList;
Option 2
_pagingController.itemList.removeWhere(...); _pagingController.notifyListeners();
Option 2 worked for me. Do you know of a way to make it animate instead of just suddenly disappearing?
I want to remove an item from the list.
Tried these 2 options below suggested in https://github.com/EdsonBueno/infinite_scroll_pagination/issues/18 but they didn't work. I had to scroll the list manually, and then it was removed. I don't want users to scroll manually to remove an item.
Option 1
Option 2