copy method
The collection object is copied, but the elements of the collection content are not copied.
Implementation
List<T> copy() {
final List<T> list = [];
for (var i = 0; i < length; i++) {
list.add(this[i]);
}
return list;
}
The collection object is copied, but the elements of the collection content are not copied.
List<T> copy() {
final List<T> list = [];
for (var i = 0; i < length; i++) {
list.add(this[i]);
}
return list;
}