addToBuilder static method

void addToBuilder(
  1. ObjCProtocolBuilder builder, {
  2. void stream_handleEvent_(
    1. NSStream,
    2. int
    )?,
  3. bool $keepIsolateAlive = true,
})

Adds the implementation of the NSStreamDelegate protocol to an existing objc.ObjCProtocolBuilder.

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

Implementation

static void addToBuilder(
  objc.ObjCProtocolBuilder builder, {
  void Function(NSStream, int)? stream_handleEvent_,
  bool $keepIsolateAlive = true,
}) {
  NSStreamDelegate$Builder.stream_handleEvent_.implement(
    builder,
    stream_handleEvent_,
  );
  builder.addProtocol($protocol);
}