Flutter remove item from list

my question is about flutter’s listview.

When i delete item from list ans set the state

setState(
    () { 
        items.removeAt(500);
    }); 

Flutter listview.builder scrolls to top. i want to make not scroll after deleting item from list.

1 Like

https://api.dartlang.org/stable/2.0.0/dart-core/List/removeWhere.html please check this link if any doubt please reply

3 Likes

for remove all items from list:

List numbers = [‘one’, ‘two’, ‘three’, ‘four’];
numbers.removeWhere((item) => item != null);

1 Like