Closed liujian-930212 closed 2 months ago
you have to copy the list safely when removing items.
pageController.itemList = pageController.itemList.toList().where((e) => /* some condition */ );
this will correctly update the state, as we are using toList
to create a new list before assigning it.
I tried to use itemList setter to remove an item, and it seemed worked fine.
But an RangeError occurred when ‘too many items’ were removed unless refresh the whole PagedListView every time, which is laggy.
Is there a safe way to do so?
Thanks