fromFunctionPointer static method
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<
NSAttributedString Function(ffi.Pointer<ffi.Void>, objc.NSRange)
>
fromFunctionPointer(
ffi.Pointer<
ffi.NativeFunction<
ffi.Pointer<objc.ObjCObject> Function(
ffi.Pointer<ffi.Void> arg0,
NSRange arg1,
)
>
>
ptr,
) =>
objc.ObjCBlock<
NSAttributedString Function(ffi.Pointer<ffi.Void>, objc.NSRange)
>(
objc.newPointerBlock(
_ObjCBlock_NSAttributedString_ffiVoid_NSRange$1_fnPtrCallable,
ptr.cast(),
),
retain: false,
release: true,
);