jsStdAddHelpers method

void jsStdAddHelpers({
  1. int argc = 0,
  2. List<String>? argv,
})

Implementation

void jsStdAddHelpers({int argc = 0, List<String>? argv}) {
  argv ??= [];
  final ptr = calloc.allocate<Pointer<Utf8>>(argv.length);
  for (int i = 0; i < argc; i++) {
    ptr[i] = argv[i].toNativeUtf8();
  }
  try {
    return js_std_add_helpers(_ref, argc, ptr); // argv will copy to js string
  } finally {
    calloc.free(ptr);
  }
}