writeFunc function Null safety
Implementation
void writeFunc(Pointer<Void> stream, Pointer<Void> data, int bytesCount) {
Pointer<Pointer<Uint8>> buffer_stream = stream.cast();
Pointer<Int32> currentByteCount = Pointer.fromAddress(buffer_stream[0].address);
if (bytesCount != 0) {
for (var i = 0; i < bytesCount; i++) {
buffer_stream[1][currentByteCount.value + i] = Pointer<Uint8>.fromAddress(data.address + i).value;
}
currentByteCount.value += bytesCount;
}
}