implement static method
Builds an object that implements the NSSoundDelegate 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 NSSoundDelegate implement({
void Function(NSSound, bool)? sound_didFinishPlaying_,
bool $keepIsolateAlive = true,
}) {
final builder = objc.ObjCProtocolBuilder(debugName: 'NSSoundDelegate');
NSSoundDelegate.sound_didFinishPlaying_.implement(
builder,
sound_didFinishPlaying_,
);
builder.addProtocol($protocol);
return NSSoundDelegate.castFrom(
builder.build(keepIsolateAlive: $keepIsolateAlive),
);
}