addToBuilderAsBlocking static method

void addToBuilderAsBlocking(
  1. ObjCProtocolBuilder builder, {
  2. required void observeValueForKeyPath_ofObject_change_context_(
    1. NSString,
    2. ObjCObject,
    3. NSDictionary,
    4. Pointer<Void>,
    ),
  3. bool $keepIsolateAlive = true,
})

Adds the implementation of the Observer protocol to an existing objc.ObjCProtocolBuilder. All methods that can be implemented as blocking listeners will be.

Note: You cannot call this method after you have called builder.build.

Implementation

static void addToBuilderAsBlocking(
  objc.ObjCProtocolBuilder builder, {
  required void Function(
    NSString,
    objc.ObjCObject,
    NSDictionary,
    ffi.Pointer<ffi.Void>,
  )
  observeValueForKeyPath_ofObject_change_context_,
  bool $keepIsolateAlive = true,
}) {
  Observer$Builder.observeValueForKeyPath_ofObject_change_context_
      .implementAsBlocking(
        builder,
        observeValueForKeyPath_ofObject_change_context_,
      );
  builder.addProtocol($protocol);
}