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}) {
  objc.checkOsVersionInternal('UIBarButtonItem.initWithBarButtonSystemItem:primaryAction:', iOS: (false, (14, 0, 0)));
  final _ret = _objc_msgSend_ka2bhe(
    this.ref.retainAndReturnPointer(),
    _sel_initWithBarButtonSystemItem_primaryAction_,
    systemItem.value,
    primaryAction?.ref.pointer ?? ffi.nullptr,
  );
  return UIBarButtonItem.castFromPointer(_ret, retain: false, release: true);
}