implementAsBlocking static method
NSColorChanging
implementAsBlocking({
- required void changeColor_(),
- bool $keepIsolateAlive = true,
Builds an object that implements the NSColorChanging 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 NSColorChanging implementAsBlocking({
required void Function(NSColorPanel$1?) changeColor_,
bool $keepIsolateAlive = true,
}) {
final builder = objc.ObjCProtocolBuilder(debugName: 'NSColorChanging');
NSColorChanging.changeColor_.implementAsBlocking(builder, changeColor_);
builder.addProtocol($protocol);
return NSColorChanging.castFrom(
builder.build(keepIsolateAlive: $keepIsolateAlive),
);
}