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