initWithBarButtonSystemItem$1 method

UIBarButtonItem initWithBarButtonSystemItem$1(
  1. UIBarButtonSystemItem systemItem, {
  2. UIAction? primaryAction,
})

Creates a bar button item for the given systemItem. The primaryAction is copied, and its title & image are ignored.

Implementation

UIBarButtonItem initWithBarButtonSystemItem$1(UIBarButtonSystemItem systemItem, {UIAction? primaryAction}) {
  final _$$ref = object$.ref;
  final _$$ref$1 = primaryAction?.ref;
  objc.checkOsVersionInternal('UIBarButtonItem.initWithBarButtonSystemItem:primaryAction:', iOS: (false, (14, 0, 0)));
  final $ret = _objc_msgSend_ka2bhe(
    _$$ref.retainAndReturnPointer(),
    _sel_initWithBarButtonSystemItem_primaryAction_,
    systemItem.value,
    _$$ref$1?.pointer ?? ffi.nullptr,
  );
  return UIBarButtonItem.fromPointer($ret, retain: false, release: true);
}