void main() {
List<int> numberList = [10, 20, 30, 40, 50];
numberList.removeRange(0, 3);
print(numberList); // -> prints [40, 50]
}
To remove more than one item from a List in Dart, the .removeRange() method can be used. The basic syntax is:
List.removeRange(int startIndex, int endIndex)
0 Comments