Метод toList
List<E> toList(Создаёт List, содержащий элементы этого Iterable.
Элементы расположены в порядке итерации. Список имеет фиксированную длину, если growable равно false.
Исходный код
List<E> toList({bool growable: true}) {
List<E> result;
if (growable) {
result = new List<E>()..length = length;
} else {
result = new List<E>(length);
}
for (int i = 0; i < length; i++) {
result[i] = this[i];
}
return result;
}
© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dartlang.org/stable/1.24.3/dart-collection/ListMixin/toList.html