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