createWithId static method

LaunchAtLogin? createWithId(
  1. String id
)

Creates a new LaunchAtLogin; returns null if the native side failed.

Implementation

static LaunchAtLogin? createWithId(String id) {
  final idNative = id.toNativeUtf8().cast<ffi.Char>();
  final handle = c.native_launch_at_login_create_with_id(idNative);
  pkg_ffi.calloc.free(idNative);
  if (handle == 0) return null;
  return LaunchAtLogin.fromHandle(handle);
}