getValuesByIndexes<V> method
Returns (ID, value) pairs for the given indexes.
values must be aligned with this collection's internal ordering.
Implementation
List<(D, V)> getValuesByIndexes<V>(Iterable<int> indexes, List<V> values) {
if (values.length < length) {
return indexes
.map((i) {
var id = _ids[i];
if (i < values.length) {
return (id, values[i]);
} else {
return null;
}
})
.nonNulls
.toList();
}
return indexes.map((i) {
var id = _ids[i];
return (id, values[i]);
}).toList();
}