call method

Implementation

NSAttributedString? call(
  ffi.Pointer<ffi.Void> arg0,
  NSRange arg1,
  NSRangePointer arg2,
) =>
    ref.pointer.ref.invoke
            .cast<
              ffi.NativeFunction<
                ffi.Pointer<objc.ObjCObject> Function(
                  ffi.Pointer<objc.ObjCBlockImpl> block,
                  ffi.Pointer<ffi.Void> arg0,
                  NSRange arg1,
                  NSRangePointer arg2,
                )
              >
            >()
            .asFunction<
              ffi.Pointer<objc.ObjCObject> Function(
                ffi.Pointer<objc.ObjCBlockImpl>,
                ffi.Pointer<ffi.Void>,
                NSRange,
                NSRangePointer,
              )
            >()(ref.pointer, arg0, arg1, arg2)
            .address ==
        0
    ? null
    : NSAttributedString.castFromPointer(
        ref.pointer.ref.invoke
            .cast<
              ffi.NativeFunction<
                ffi.Pointer<objc.ObjCObject> Function(
                  ffi.Pointer<objc.ObjCBlockImpl> block,
                  ffi.Pointer<ffi.Void> arg0,
                  NSRange arg1,
                  NSRangePointer arg2,
                )
              >
            >()
            .asFunction<
              ffi.Pointer<objc.ObjCObject> Function(
                ffi.Pointer<objc.ObjCBlockImpl>,
                ffi.Pointer<ffi.Void>,
                NSRange,
                NSRangePointer,
              )
            >()(ref.pointer, arg0, arg1, arg2),
        retain: true,
        release: true,
      );