snapcraft_launcher 0.1.0 copy "snapcraft_launcher: ^0.1.0" to clipboard
snapcraft_launcher: ^0.1.0 copied to clipboard

PlatformLinux

A native Dart client library to access the snapd desktop-launch interface.

snapcraft_launcher.dart #

Native Dart client library to access the snapd desktop-launch interface.

import 'package:snapcraft_launcher/snapcraft_launcher.dart';

void main(List<String> args) async {
  if (args.isEmpty) {
    print('please provide a desktop file ID');
    return;
  }

  final launcher = PrivilegedDesktopLauncher();
  await launcher.connect();
  if (launcher.isAvailable) {
    await launcher.openDesktopEntry(args.first);
  } else {
    print('Cannot access io.snapcraft.PrivilegedDesktopLauncher');
  }
  await launcher.close();
}
0
likes
160
pub points
75%
popularity

Publisher

unverified uploader

A native Dart client library to access the snapd desktop-launch interface.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MPL-2.0 (LICENSE)

Dependencies

dbus, meta

More

Packages that depend on snapcraft_launcher