primaryAction property

UIAction? get primaryAction

Set the primaryAction on this item, updating the title & image of the item if appropriate (primaryAction is non-nil, and this is not a system item). When primaryAction is non-nil, the target & action properties are ignored. If primaryAction is set to nil, the title & image properties are left unchanged.

Implementation

UIAction? get primaryAction {
  objc.checkOsVersionInternal('UIBarButtonItem.primaryAction', iOS: (false, (14, 0, 0)));
  final _ret = _objc_msgSend_151sglz(this.ref.pointer, _sel_primaryAction);
  return _ret.address == 0 ? null : UIAction.castFromPointer(_ret, retain: true, release: true);
}
set primaryAction (UIAction? value)

Set the primaryAction on this item, updating the title & image of the item if appropriate (primaryAction is non-nil, and this is not a system item). When primaryAction is non-nil, the target & action properties are ignored. If primaryAction is set to nil, the title & image properties are left unchanged.

Implementation

set primaryAction(UIAction? value) {
  objc.checkOsVersionInternal('UIBarButtonItem.setPrimaryAction:', iOS: (false, (14, 0, 0)));
  _objc_msgSend_xtuoz7(this.ref.pointer, _sel_setPrimaryAction_, value?.ref.pointer ?? ffi.nullptr);
}