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