ffiGetUint8List function

Uint8List ffiGetUint8List(
  1. Pointer<Uint8ListFFI> value, {
  2. bool free = false,
})

Implementation

Uint8List ffiGetUint8List(Pointer<Uint8ListFFI> value, {bool free = false}) {
  if (value == nullptr) return Uint8List(0);
  final result = Uint8List.fromList(
      value.ref.str.cast<Uint8>().asTypedList(value.ref.length));
  if (free) {
    FFIType.freeCppUint8ListFFI(value);
  }
  return result;
}