observeValueForKeyPath method

void observeValueForKeyPath(
  1. NSString? keyPath, {
  2. ObjCObjectBase? ofObject,
  3. NSDictionary? change,
  4. required Pointer<Void> context,
})

observeValueForKeyPath:ofObject:change:context:

Implementation

void observeValueForKeyPath(
  objc.NSString? keyPath, {
  objc.ObjCObjectBase? ofObject,
  objc.NSDictionary? change,
  required ffi.Pointer<ffi.Void> context,
}) {
  objc.checkOsVersionInternal(
    'NSObject.observeValueForKeyPath:ofObject:change:context:',
    iOS: (false, (2, 0, 0)),
    macOS: (false, (10, 0, 0)),
  );
  _objc_msgSend_1pl4k3n(
    this.ref.pointer,
    _sel_observeValueForKeyPath_ofObject_change_context_,
    keyPath?.ref.pointer ?? ffi.nullptr,
    ofObject?.ref.pointer ?? ffi.nullptr,
    change?.ref.pointer ?? ffi.nullptr,
    context,
  );
}