void main() {
List<int> numberList = [10, 20, 30, 40, 50];
numberList.removeAt(2); //Remove value from 3rd position
print(numberList);
}
To pop an element from a position using its index you can use the .removeAt() method of Dart. The method will remove the element from a List and returns the removed element. The basic syntax for this method is:
List.removeAt(index);
0 Comments