byteDataToPointer static method
Implementation
static Pointer<Int8> byteDataToPointer(ByteBuffer byteBuffer) {
final uint8List = byteBuffer.asInt8List();
final length = byteBuffer.lengthInBytes;
final result = calloc<Int8>(length);
for (var i = 0; i < length; ++i) {
result[i] = uint8List[i];
}
return result;
}