passArray8ToWasm0 method

List<int> passArray8ToWasm0(
  1. Uint8List arg,
  2. int malloc(
    1. int
    )
)

Implementation

List<int> passArray8ToWasm0(Uint8List arg, int Function(int) malloc) {
  final ptr = malloc(arg.length * 1);

  getUint8Memory0().setAll((ptr ~/ 1), arg);
  return [ptr, arg.length];
}