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