drain method
Removes the element at the given index from the Vec and returns it.
Implementation
@pragma('vm:prefer-inline')
Vec<T> drain(int start, int end) {
final range = getRange(start, end).toList();
removeRange(start, end);
return range;
}