addToBuilder static method

void addToBuilder(
  1. ObjCProtocolBuilder builder, {
  2. void prepareForSegue_sender_(
    1. NSStoryboardSegue,
    2. ObjCObjectBase?
    )?,
  3. void performSegueWithIdentifier_sender_(
    1. DartNSStoryboardSegueIdentifier,
    2. ObjCObjectBase?
    )?,
  4. bool shouldPerformSegueWithIdentifier_sender_(
    1. DartNSStoryboardSegueIdentifier,
    2. ObjCObjectBase?
    )?,
  5. bool $keepIsolateAlive = true,
})

Adds the implementation of the NSSeguePerforming protocol to an existing objc.ObjCProtocolBuilder.

Note: You cannot call this method after you have called builder.build.

Implementation

static void addToBuilder(
  objc.ObjCProtocolBuilder builder, {
  void Function(NSStoryboardSegue, objc.ObjCObjectBase?)?
  prepareForSegue_sender_,
  void Function(DartNSStoryboardSegueIdentifier, objc.ObjCObjectBase?)?
  performSegueWithIdentifier_sender_,
  bool Function(DartNSStoryboardSegueIdentifier, objc.ObjCObjectBase?)?
  shouldPerformSegueWithIdentifier_sender_,
  bool $keepIsolateAlive = true,
}) {
  NSSeguePerforming.prepareForSegue_sender_.implement(
    builder,
    prepareForSegue_sender_,
  );
  NSSeguePerforming.performSegueWithIdentifier_sender_.implement(
    builder,
    performSegueWithIdentifier_sender_,
  );
  NSSeguePerforming.shouldPerformSegueWithIdentifier_sender_.implement(
    builder,
    shouldPerformSegueWithIdentifier_sender_,
  );
  builder.addProtocol($protocol);
}