allocatePointer method

Pointer<Char> allocatePointer()

Allocates a pointer filled with the Uint8List data.

Implementation

Pointer<Char> allocatePointer() {
  final Pointer<Int8> blob = calloc<Int8>(length);
  final Int8List blobBytes = blob.asTypedList(length);
  blobBytes.setAll(0, this);
  return blob.cast<Char>();
}