getWithAccelerator method

Shortcut? getWithAccelerator(
  1. String accelerator
)

Implementation

Shortcut? getWithAccelerator(String accelerator) {
  final acceleratorNative = accelerator.toNativeUtf8().cast<ffi.Char>();
  final handle = c.native_shortcut_manager_get_with_accelerator(
    acceleratorNative,
  );
  pkg_ffi.calloc.free(acceleratorNative);
  if (handle == 0) return null;
  return Shortcut.fromHandle(handle);
}