checkElementIndex static method
Implementation
static int checkElementIndex(int index, int size, {Object? desc}) {
if (index < 0 || index >= size) {
throw RangeError(_resolveMessage(
desc, "Index $index out of the bounds for List of size $size"));
}
return index;
}