alloc static method
JSStaticValueRef
alloc({
- String? name,
- Pointer<
NativeFunction< ? getProperty,JSObjectGetPropertyCallback_> > - Pointer<
NativeFunction< ? setProperty,JSObjectSetPropertyCallback_> > - int attributes = 0,
Implementation
static JSStaticValueRef alloc({
String? name,
Pointer<NativeFunction<JSObjectGetPropertyCallback_>>? getProperty,
Pointer<NativeFunction<JSObjectSetPropertyCallback_>>? setProperty,
int attributes = 0,
}) {
final pointer = calloc<JSStaticValue_>(1);
pointer.ref
..name = name?.toNativeUtf8() ?? nullptr
..setProperty = setProperty ?? nullptr
..getProperty = getProperty ?? nullptr
..attributes = attributes;
return pointer;
}