initWithContentsOfURL method
initWithContentsOfURL:encoding:error:
Implementation
NSString? initWithContentsOfURL(
NSURL url, {
required DartNSUInteger encoding,
}) {
final _$$ref = object$.ref;
final _$$ref$1 = url.ref;
final $err = pkg_ffi.calloc<ffi.Pointer<objc.ObjCObjectImpl>>();
try {
final $ret = _objc_msgSend_1nomli1(
_$$ref.retainAndReturnPointer(),
_sel_initWithContentsOfURL_encoding_error_,
_$$ref$1.pointer,
encoding,
$err,
);
objc.NSErrorException.checkErrorPointer($err.value);
return $ret.address == 0
? null
: NSString.fromPointer($ret, retain: false, release: true);
} finally {
pkg_ffi.calloc.free($err);
}
}