operator [] method
Get the element at the given index. Must be implemented by subclasses to call the appropriate spine_array_*_get
Implementation
@override
Slot? operator [](int index) {
if (index < 0 || index >= length) {
throw RangeError.index(index, this, 'index');
}
final buffer = SpineBindings.bindings.spine_array_slot_buffer(nativePtr.cast());
return buffer[index].address == 0 ? null : Slot.fromPointer(buffer[index]);
}