dataFromRange method
dataFromRange:documentAttributes:error:
Implementation
objc.NSData? dataFromRange(objc.NSRange range, {required objc.NSDictionary documentAttributes}) {
objc.checkOsVersionInternal('NSAttributedString.dataFromRange:documentAttributes:error:', iOS: (false, (7, 0, 0)), macOS: (false, (10, 0, 0)));
final $err = pkg_ffi.calloc<ffi.Pointer<objc.ObjCObjectImpl>>();
try {
final $ret = _objc_msgSend_193219c(object$.ref.pointer, _sel_dataFromRange_documentAttributes_error_, range, documentAttributes.ref.pointer, $err);
objc.NSErrorException.checkErrorPointer($err.value);
return $ret.address == 0 ? null : objc.NSData.fromPointer($ret, retain: true, release: true); } finally {
pkg_ffi.calloc.free($err);
}
}