convertUint8ListToPointerChar function

Pointer<UnsignedChar> convertUint8ListToPointerChar(
  1. Uint8List data
)

Implementation

Pointer<UnsignedChar> convertUint8ListToPointerChar(Uint8List data) {
  final Pointer<Uint8> frameData = calloc<Uint8>(data.length);
  final pointerList = frameData.asTypedList(data.length);
  pointerList.setAll(0, data);

  return frameData.cast<UnsignedChar>();
}