implement static method
NSAnimatablePropertyContainer
implement({
- required ObjCObjectBase animator(),
- required NSDictionary animations(),
- required void setAnimations_(
- NSDictionary keyedValues
- required ObjCObjectBase? animationForKey_(
- NSString aClassName
- bool $keepIsolateAlive = true,
Builds an object that implements the NSAnimatablePropertyContainer 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 NSAnimatablePropertyContainer implement({
required Dartinstancetype Function() animator,
required objc.NSDictionary Function() animations,
required void Function(objc.NSDictionary) setAnimations_,
required objc.ObjCObjectBase? Function(DartNSAnimatablePropertyKey)
animationForKey_,
bool $keepIsolateAlive = true,
}) {
final builder = objc.ObjCProtocolBuilder(
debugName: 'NSAnimatablePropertyContainer',
);
NSAnimatablePropertyContainer.animator.implement(builder, animator);
NSAnimatablePropertyContainer.animations.implement(builder, animations);
NSAnimatablePropertyContainer.setAnimations_.implement(
builder,
setAnimations_,
);
NSAnimatablePropertyContainer.animationForKey_.implement(
builder,
animationForKey_,
);
builder.addProtocol($protocol);
return NSAnimatablePropertyContainer.castFrom(
builder.build(keepIsolateAlive: $keepIsolateAlive),
);
}