openDocumentWithContentsOfFile method

ObjCObjectBase? openDocumentWithContentsOfFile(
  1. NSString fileName, {
  2. required bool display,
})

openDocumentWithContentsOfFile:display:

Implementation

objc.ObjCObjectBase? openDocumentWithContentsOfFile(
  objc.NSString fileName, {
  required bool display,
}) {
  objc.checkOsVersionInternal(
    'NSDocumentController.openDocumentWithContentsOfFile:display:',
    iOS: (true, null),
    macOS: (false, (10, 0, 0)),
  );
  final _ret = _objc_msgSend_17amj0z(
    this.ref.pointer,
    _sel_openDocumentWithContentsOfFile_display_,
    fileName.ref.pointer,
    display,
  );
  return _ret.address == 0
      ? null
      : objc.ObjCObjectBase(_ret, retain: true, release: true);
}