addToBuilderAsBlocking static method

void addToBuilderAsBlocking(
  1. ObjCProtocolBuilder builder, {
  2. void speechRecognizer_didRecognizeCommand_(
    1. NSSpeechRecognizer,
    2. NSString
    )?,
  3. bool $keepIsolateAlive = true,
})

Adds the implementation of the NSSpeechRecognizerDelegate protocol to an existing objc.ObjCProtocolBuilder. All methods that can be implemented as blocking listeners will be.

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

Implementation

static void addToBuilderAsBlocking(
  objc.ObjCProtocolBuilder builder, {
  void Function(NSSpeechRecognizer, objc.NSString)?
  speechRecognizer_didRecognizeCommand_,
  bool $keepIsolateAlive = true,
}) {
  NSSpeechRecognizerDelegate.speechRecognizer_didRecognizeCommand_
      .implementAsBlocking(builder, speechRecognizer_didRecognizeCommand_);
  builder.addProtocol($protocol);
}