operator [] method
Returns the element at the specified index
.
Throws RangeError if index
is out of bounds.
Implementation
@override
T operator [](int index) {
if (index >= 0 && index < length) {
return _items[_normalizeIndex(index)];
}
throw RangeError.index(index, this);
}