launch_at_startup 0.1.4 launch_at_startup: ^0.1.4 copied to clipboard
This plugin allows Flutter desktop apps to Auto launch on startup / login.
launch_at_startup #
This plugin allows Flutter desktop apps to Auto launch on startup / login.
English | 简体中文
Platform Support #
Linux | macOS | Windows |
---|---|---|
✔️ | ✔️ | ✔️ |
⚠️ macOS only supports non-sandbox mode.
Quick Start #
Installation #
Add this to your package's pubspec.yaml file:
dependencies:
launch_at_startup: ^0.1.4
Or
dependencies:
launch_at_startup:
git:
url: https://github.com/leanflutter/launch_at_startup.git
ref: main
Usage #
import 'dart:io';
import 'package:launch_at_startup/launch_at_startup.dart';
import 'package:package_info_plus/package_info_plus.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
PackageInfo packageInfo = await PackageInfo.fromPlatform();
launchAtStartup.setup(
appName: packageInfo.appName,
appPath: Platform.resolvedExecutable,
);
await launchAtStartup.enable();
await launchAtStartup.disable();
bool isEnabled = await launchAtStartup.isEnabled();
runApp(const MyApp());
}
// ...
Please see the example app of this plugin for a full example.
Who's using it? #
- Biyi (比译) - A convenient translation and dictionary app.