onElementSet method
Called when element at index is set.
Implement in platform-specific subclass to write through to memory.
Implementation
@override
void onElementSet(int index, E value) {
if (ptr == null || ptr!.address == 0) return;
_indexSetter(ptr!, index, value);
}