implementAsBlocking static method
NSStackViewDelegate
implementAsBlocking({
- void stackView_willDetachViews_(
- NSStackView,
- NSArray
- void stackView_didReattachViews_(
- NSStackView,
- NSArray
- bool $keepIsolateAlive = true,
Builds an object that implements the NSStackViewDelegate protocol. To implement
multiple protocols, use addToBuilder or objc.ObjCProtocolBuilder directly. All
methods that can be implemented as blocking listeners will be.
If $keepIsolateAlive is true, this protocol will keep this isolate
alive until it is garbage collected by both Dart and ObjC.
Implementation
static NSStackViewDelegate implementAsBlocking({
void Function(NSStackView, objc.NSArray)? stackView_willDetachViews_,
void Function(NSStackView, objc.NSArray)? stackView_didReattachViews_,
bool $keepIsolateAlive = true,
}) {
final builder = objc.ObjCProtocolBuilder(debugName: 'NSStackViewDelegate');
NSStackViewDelegate.stackView_willDetachViews_.implementAsBlocking(
builder,
stackView_willDetachViews_,
);
NSStackViewDelegate.stackView_didReattachViews_.implementAsBlocking(
builder,
stackView_didReattachViews_,
);
builder.addProtocol($protocol);
return NSStackViewDelegate.castFrom(
builder.build(keepIsolateAlive: $keepIsolateAlive),
);
}