addToBuilder static method

void addToBuilder(
  1. ObjCProtocolBuilder builder, {
  2. NSTouchBarItem? touchBar_makeItemForIdentifier_(
    1. NSTouchBar,
    2. DartNSTouchBarItemIdentifier
    )?,
  3. bool $keepIsolateAlive = true,
})

Adds the implementation of the NSTouchBarDelegate 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, {
  NSTouchBarItem? Function(NSTouchBar, DartNSTouchBarItemIdentifier)?
  touchBar_makeItemForIdentifier_,
  bool $keepIsolateAlive = true,
}) {
  NSTouchBarDelegate.touchBar_makeItemForIdentifier_.implement(
    builder,
    touchBar_makeItemForIdentifier_,
  );
  builder.addProtocol($protocol);
}