operator [] method
Get the element at the given index. Must be implemented by subclasses to call the appropriate spine_array_*_get
Implementation
@override
int operator [](int index) {
if (index < 0 || index >= length) {
throw RangeError.index(index, this, 'index');
}
final buffer = SpineBindings.bindings.spine_array_property_id_buffer(nativePtr.cast());
// NOTE: This will not compile due to C API bug - buffer() returns int instead of Pointer
return buffer.cast<Int64>()[index];
}