implement static method
NSViewControllerPresentationAnimator
implement({
- required void animatePresentationOfViewController_fromViewController_(),
- required void animateDismissalOfViewController_fromViewController_(),
- bool $keepIsolateAlive = true,
Builds an object that implements the NSViewControllerPresentationAnimator 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 NSViewControllerPresentationAnimator implement({
required void Function(NSViewController, NSViewController)
animatePresentationOfViewController_fromViewController_,
required void Function(NSViewController, NSViewController)
animateDismissalOfViewController_fromViewController_,
bool $keepIsolateAlive = true,
}) {
final builder = objc.ObjCProtocolBuilder(
debugName: 'NSViewControllerPresentationAnimator',
);
NSViewControllerPresentationAnimator
.animatePresentationOfViewController_fromViewController_
.implement(
builder,
animatePresentationOfViewController_fromViewController_,
);
NSViewControllerPresentationAnimator
.animateDismissalOfViewController_fromViewController_
.implement(
builder,
animateDismissalOfViewController_fromViewController_,
);
builder.addProtocol($protocol);
return NSViewControllerPresentationAnimator.castFrom(
builder.build(keepIsolateAlive: $keepIsolateAlive),
);
}