fromFunctionPointer static method
ObjCBlock<Void Function(Pointer<Void> , ObjCBlock<NSDictionary Function(NSDictionary)> )>
fromFunctionPointer()
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<
ffi.Void Function(ffi.Pointer<ffi.Void>, objc.ObjCBlock<objc.NSDictionary Function(objc.NSDictionary)>)
>
fromFunctionPointer(
ffi.Pointer<ffi.NativeFunction<ffi.Void Function(ffi.Pointer<ffi.Void> arg0, ffi.Pointer<objc.ObjCBlockImpl> arg1)>>
ptr,
) =>
objc.ObjCBlock<
ffi.Void Function(ffi.Pointer<ffi.Void>, objc.ObjCBlock<objc.NSDictionary Function(objc.NSDictionary)>)
>(
objc.newPointerBlock(_ObjCBlock_ffiVoid_ffiVoid_UITextAttributesConversionHandler_fnPtrCallable, ptr.cast()),
retain: false,
release: true,
);