addToBuilder static method

void addToBuilder(
  1. ObjCProtocolBuilder builder, {
  2. void textStorage_willProcessEditing_range_changeInLength_(
    1. NSTextStorage,
    2. NSTextStorageEditActions,
    3. NSRange,
    4. DartNSInteger,
    )?,
  3. void textStorage_didProcessEditing_range_changeInLength_(
    1. NSTextStorage,
    2. NSTextStorageEditActions,
    3. NSRange,
    4. DartNSInteger,
    )?,
  4. bool $keepIsolateAlive = true,
})

Adds the implementation of the NSTextStorageDelegate 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(
    NSTextStorage,
    NSTextStorageEditActions,
    NSRange,
    DartNSInteger,
  )?
  textStorage_willProcessEditing_range_changeInLength_,
  void Function(
    NSTextStorage,
    NSTextStorageEditActions,
    NSRange,
    DartNSInteger,
  )?
  textStorage_didProcessEditing_range_changeInLength_,
  bool $keepIsolateAlive = true,
}) {
  NSTextStorageDelegate.textStorage_willProcessEditing_range_changeInLength_
      .implement(
        builder,
        textStorage_willProcessEditing_range_changeInLength_,
      );
  NSTextStorageDelegate.textStorage_didProcessEditing_range_changeInLength_
      .implement(
        builder,
        textStorage_didProcessEditing_range_changeInLength_,
      );
  builder.addProtocol($protocol);
}