ffiCreateUint8List function
Implementation
Pointer<Uint8ListFFI> ffiCreateUint8List(Uint8List? value) {
if (value == null) return nullptr;
final blob = calloc<Uint8>(value.length);
final blobBytes = blob.asTypedList(value.length);
blobBytes.setAll(0, value);
final Pointer<Uint8ListFFI> pointer = calloc.call(sizeOf<Uint8ListFFI>());
pointer.ref.str = blob.cast();
pointer.ref.length = value.length;
return pointer;
}