implement static method
NSComboBoxCellDataSource
implement({
- DartNSInteger numberOfItemsInComboBoxCell_()?,
- ObjCObjectBase comboBoxCell_objectValueForItemAtIndex_()?,
- DartNSUInteger comboBoxCell_indexOfItemWithStringValue_(
- NSComboBoxCell,
- NSString
- NSString? comboBoxCell_completedString_(
- NSComboBoxCell,
- NSString
- bool $keepIsolateAlive = true,
Builds an object that implements the NSComboBoxCellDataSource 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 NSComboBoxCellDataSource implement({
DartNSInteger Function(NSComboBoxCell)? numberOfItemsInComboBoxCell_,
objc.ObjCObjectBase Function(NSComboBoxCell, DartNSInteger)?
comboBoxCell_objectValueForItemAtIndex_,
DartNSUInteger Function(NSComboBoxCell, objc.NSString)?
comboBoxCell_indexOfItemWithStringValue_,
objc.NSString? Function(NSComboBoxCell, objc.NSString)?
comboBoxCell_completedString_,
bool $keepIsolateAlive = true,
}) {
final builder = objc.ObjCProtocolBuilder(
debugName: 'NSComboBoxCellDataSource',
);
NSComboBoxCellDataSource.numberOfItemsInComboBoxCell_.implement(
builder,
numberOfItemsInComboBoxCell_,
);
NSComboBoxCellDataSource.comboBoxCell_objectValueForItemAtIndex_.implement(
builder,
comboBoxCell_objectValueForItemAtIndex_,
);
NSComboBoxCellDataSource.comboBoxCell_indexOfItemWithStringValue_.implement(
builder,
comboBoxCell_indexOfItemWithStringValue_,
);
NSComboBoxCellDataSource.comboBoxCell_completedString_.implement(
builder,
comboBoxCell_completedString_,
);
builder.addProtocol($protocol);
return NSComboBoxCellDataSource.castFrom(
builder.build(keepIsolateAlive: $keepIsolateAlive),
);
}