implement static method
NSAnimationDelegate
implement({})
Builds an object that implements the NSAnimationDelegate 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 NSAnimationDelegate implement({
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,
}) {
final builder = objc.ObjCProtocolBuilder(debugName: 'NSAnimationDelegate');
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);
return NSAnimationDelegate.castFrom(
builder.build(keepIsolateAlive: $keepIsolateAlive),
);
}