implement static method
Builds an object that implements the NSStreamDelegate protocol. To implement multiple protocols, use addToBuilder or objc.ObjCProtocolBuilder directly.
If $keepIsolateAlive is true, this protocol will keep this isolate
alive until it is garbage collected by both Dart and ObjC.
Implementation
static NSStreamDelegate implement({
void Function(NSStream, int)? stream_handleEvent_,
bool $keepIsolateAlive = true,
}) {
final builder = objc.ObjCProtocolBuilder(debugName: 'NSStreamDelegate');
NSStreamDelegate$Builder.stream_handleEvent_.implement(
builder,
stream_handleEvent_,
);
builder.addProtocol($protocol);
return NSStreamDelegate.as(
builder.build(keepIsolateAlive: $keepIsolateAlive),
);
}