allocateBytes static method

Pointer<Uint8> allocateBytes(
  1. List<int> bytes
)

Implementation

static ffi.Pointer<ffi.Uint8> allocateBytes(List<int> bytes) {
  final ptr = calloc<ffi.Uint8>(bytes.length);
  ptr.asTypedList(bytes.length).setAll(0, bytes);
  return ptr;
}