get method

T get(
  1. int index
)

Retrieves the element at the specified 0-based index in O(1) time.

Implementation

T get(int index) {
  if (index < 0 || index >= length) {
    throw RangeError.index(index, this);
  }
  return (start + index * step) as T;
}