snapcraft_launcher

Creator: coderz1093

Last updated:

0 purchases

snapcraft_launcher Image
snapcraft_launcher Images

Languages

Categories

Add to Cart

Description:

snapcraft launcher

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();
}
copied to clipboard

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.