implement static method

NSPathCellDelegate implement({
  1. void pathCell_willDisplayOpenPanel_(
    1. NSPathCell,
    2. NSOpenPanel
    )?,
  2. void pathCell_willPopUpMenu_(
    1. NSPathCell,
    2. NSMenu
    )?,
  3. bool $keepIsolateAlive = true,
})

Builds an object that implements the NSPathCellDelegate 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 NSPathCellDelegate implement({
  void Function(NSPathCell, NSOpenPanel)? pathCell_willDisplayOpenPanel_,
  void Function(NSPathCell, NSMenu)? pathCell_willPopUpMenu_,
  bool $keepIsolateAlive = true,
}) {
  final builder = objc.ObjCProtocolBuilder(debugName: 'NSPathCellDelegate');
  NSPathCellDelegate.pathCell_willDisplayOpenPanel_.implement(
    builder,
    pathCell_willDisplayOpenPanel_,
  );
  NSPathCellDelegate.pathCell_willPopUpMenu_.implement(
    builder,
    pathCell_willPopUpMenu_,
  );
  builder.addProtocol($protocol);
  return NSPathCellDelegate.castFrom(
    builder.build(keepIsolateAlive: $keepIsolateAlive),
  );
}