allocateArray static method

Pointer<JSStaticValue> allocateArray(
  1. List<JSStaticValueStruct> structList
)

Implementation

static Pointer<JSStaticValue> allocateArray(
    List<JSStaticValueStruct> structList) {
  final pointer = malloc.call<JSStaticValue>(structList.length + 1);
  for (int index = 0; index < structList.length; index++) {
    pointer[index].setValue(structList[index]);
  }
  pointer[structList.length].setValue(JSStaticValueStruct());
  return pointer;
}