addToBuilder static method

void addToBuilder(
  1. ObjCProtocolBuilder builder, {
  2. bool animationShouldStart_(
    1. NSAnimation
    )?,
  3. void animationDidStop_(
    1. NSAnimation
    )?,
  4. void animationDidEnd_(
    1. NSAnimation
    )?,
  5. double animation_valueForProgress_(
    1. NSAnimation,
    2. DartNSAnimationProgress
    )?,
  6. void animation_didReachProgressMark_(
    1. NSAnimation,
    2. DartNSAnimationProgress
    )?,
  7. bool $keepIsolateAlive = true,
})

Adds the implementation of the NSAnimationDelegate 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, {
  bool Function(NSAnimation)? animationShouldStart_,
  void Function(NSAnimation)? animationDidStop_,
  void Function(NSAnimation)? animationDidEnd_,
  double Function(NSAnimation, DartNSAnimationProgress)?
  animation_valueForProgress_,
  void Function(NSAnimation, DartNSAnimationProgress)?
  animation_didReachProgressMark_,
  bool $keepIsolateAlive = true,
}) {
  NSAnimationDelegate.animationShouldStart_.implement(
    builder,
    animationShouldStart_,
  );
  NSAnimationDelegate.animationDidStop_.implement(builder, animationDidStop_);
  NSAnimationDelegate.animationDidEnd_.implement(builder, animationDidEnd_);
  NSAnimationDelegate.animation_valueForProgress_.implement(
    builder,
    animation_valueForProgress_,
  );
  NSAnimationDelegate.animation_didReachProgressMark_.implement(
    builder,
    animation_didReachProgressMark_,
  );
  builder.addProtocol($protocol);
}