fromFunctionPointer static method
ObjCBlock<NSDictionary Function(NSDictionary)>
fromFunctionPointer(
- Pointer<
NativeFunction< ptrPointer< >ObjCObject> Function(Pointer<ObjCObject> arg0)>
Creates a block from a C function pointer.
This block must be invoked by native code running on the same thread as the isolate that registered it. Invoking the block on the wrong thread will result in a crash.
Implementation
static objc.ObjCBlock<objc.NSDictionary Function(objc.NSDictionary)> fromFunctionPointer(
ffi.Pointer<ffi.NativeFunction<ffi.Pointer<objc.ObjCObject> Function(ffi.Pointer<objc.ObjCObject> arg0)>> ptr,
) => objc.ObjCBlock<objc.NSDictionary Function(objc.NSDictionary)>(
objc.newPointerBlock(_ObjCBlock_NSDictionary_NSDictionary_fnPtrCallable, ptr.cast()),
retain: false,
release: true,
);