ShortcutOptions.fromNative constructor

ShortcutOptions.fromNative(
  1. native_shortcut_options_t raw
)

Implementation

factory ShortcutOptions.fromNative(c.native_shortcut_options_t raw) =>
    ShortcutOptions(
      accelerator: raw.accelerator == ffi.nullptr
          ? null
          : raw.accelerator.cast<pkg_ffi.Utf8>().toDartString(),
      description: raw.description == ffi.nullptr
          ? null
          : raw.description.cast<pkg_ffi.Utf8>().toDartString(),
      scope: ShortcutScope.fromValue(raw.scopeAsInt),
      enabled: raw.enabled,
    );