addAll method
As List.addAll.
Implementation
void addAll(Iterable<E> iterable) {
// Add directly to the underlying `List` then check elements there, for
// performance. Roll back the changes if validation fails.
var safeList = _safeList;
var lengthBefore = safeList.length;
safeList.addAll(iterable);
if (!_needsNullCheck) return;
try {
for (var i = lengthBefore; i != safeList.length; ++i) {
_checkElement(safeList[i]);
}
} catch (_) {
safeList.removeRange(lengthBefore, safeList.length);
rethrow;
}
}