implement static method
NSTextContentManagerDelegate
implement({
- NSTextElement? textContentManager_textElementAtLocation_()?,
- bool textContentManager_shouldEnumerateTextElement_options_()?,
- bool $keepIsolateAlive = true,
Builds an object that implements the NSTextContentManagerDelegate 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 NSTextContentManagerDelegate implement({
NSTextElement? Function(NSTextContentManager, NSTextLocation)?
textContentManager_textElementAtLocation_,
bool Function(
NSTextContentManager,
NSTextElement,
NSTextContentManagerEnumerationOptions,
)?
textContentManager_shouldEnumerateTextElement_options_,
bool $keepIsolateAlive = true,
}) {
final builder = objc.ObjCProtocolBuilder(
debugName: 'NSTextContentManagerDelegate',
);
NSTextContentManagerDelegate.textContentManager_textElementAtLocation_
.implement(builder, textContentManager_textElementAtLocation_);
NSTextContentManagerDelegate
.textContentManager_shouldEnumerateTextElement_options_
.implement(
builder,
textContentManager_shouldEnumerateTextElement_options_,
);
builder.addProtocol($protocol);
return NSTextContentManagerDelegate.castFrom(
builder.build(keepIsolateAlive: $keepIsolateAlive),
);
}