From daeb4ccd77004537d4d75620771a9fc7aa2b5d2f Mon Sep 17 00:00:00 2001 From: LiJianying Date: Sun, 20 Feb 2022 15:45:27 +0800 Subject: [PATCH] 0.1.4 --- CHANGELOG.md | 4 ++++ README-ZH.md | 10 +++++----- README.md | 10 +++++----- example/lib/pages/home.dart | 6 +++--- example/pubspec.lock | 11 +++++++++-- lib/src/launch_at_startup.dart | 2 ++ pubspec.lock | 9 ++++++++- pubspec.yaml | 7 ++++++- 8 files changed, 42 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 22a306f..d954330 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.1.4 + +- `pubspec.yaml` adds platforms field. + ## 0.1.3 - #3 Fix No such file or directory error. diff --git a/README-ZH.md b/README-ZH.md index c09b137..6e10ea0 100644 --- a/README-ZH.md +++ b/README-ZH.md @@ -45,7 +45,7 @@ ```yaml dependencies: - launch_at_startup: ^0.1.3 + launch_at_startup: ^0.1.4 ``` 或 @@ -71,15 +71,15 @@ void main() async { PackageInfo packageInfo = await PackageInfo.fromPlatform(); - LaunchAtStartup.instance.setup( + launchAtStartup.setup( appName: packageInfo.appName, appPath: Platform.resolvedExecutable, ); - await LaunchAtStartup.instance.enable(); - await LaunchAtStartup.instance.disable(); - bool isEnabled = await LaunchAtStartup.instance.isEnabled(); + await launchAtStartup.enable(); + await launchAtStartup.disable(); + bool isEnabled = await launchAtStartup.isEnabled(); runApp(const MyApp()); } diff --git a/README.md b/README.md index 29c328b..ff7e3a4 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ Add this to your package's pubspec.yaml file: ```yaml dependencies: - launch_at_startup: ^0.1.3 + launch_at_startup: ^0.1.4 ``` Or @@ -71,15 +71,15 @@ void main() async { PackageInfo packageInfo = await PackageInfo.fromPlatform(); - LaunchAtStartup.instance.setup( + launchAtStartup.setup( appName: packageInfo.appName, appPath: Platform.resolvedExecutable, ); - await LaunchAtStartup.instance.enable(); - await LaunchAtStartup.instance.disable(); - bool isEnabled = await LaunchAtStartup.instance.isEnabled(); + await launchAtStartup.enable(); + await launchAtStartup.disable(); + bool isEnabled = await launchAtStartup.isEnabled(); runApp(const MyApp()); } diff --git a/example/lib/pages/home.dart b/example/lib/pages/home.dart index b0a516a..c0acf2f 100644 --- a/example/lib/pages/home.dart +++ b/example/lib/pages/home.dart @@ -17,17 +17,17 @@ class _HomePageState extends State { } _init() async { - _isEnabled = await LaunchAtStartup.instance.isEnabled(); + _isEnabled = await launchAtStartup.isEnabled(); setState(() {}); } _handleEnable() async { - await LaunchAtStartup.instance.enable(); + await launchAtStartup.enable(); await _init(); } _handleDisable() async { - await LaunchAtStartup.instance.disable(); + await launchAtStartup.disable(); await _init(); } diff --git a/example/pubspec.lock b/example/pubspec.lock index b95a842..ae9ec62 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -120,7 +120,7 @@ packages: path: ".." relative: true source: path - version: "0.1.3" + version: "0.1.4" lints: dependency: transitive description: @@ -135,6 +135,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.12.11" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.3" meta: dependency: transitive description: @@ -251,7 +258,7 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.4.3" + version: "0.4.8" typed_data: dependency: transitive description: diff --git a/lib/src/launch_at_startup.dart b/lib/src/launch_at_startup.dart index aca5e53..08a3ed7 100644 --- a/lib/src/launch_at_startup.dart +++ b/lib/src/launch_at_startup.dart @@ -48,3 +48,5 @@ class LaunchAtStartup { Future isEnabled() => _appAutoLauncher.isEnabled(); } + +final launchAtStartup = LaunchAtStartup.instance; diff --git a/pubspec.lock b/pubspec.lock index e700af3..77bde52 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -88,6 +88,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.12.11" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.3" meta: dependency: transitive description: @@ -148,7 +155,7 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.4.3" + version: "0.4.8" typed_data: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 4484db5..4ffe4b1 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,8 +1,13 @@ name: launch_at_startup description: This plugin allows Flutter desktop apps to Auto launch on startup / login. -version: 0.1.3 +version: 0.1.4 homepage: https://github.com/leanflutter/launch_at_startup +platforms: + linux: + macos: + windows: + environment: sdk: ">=2.12.0 <3.0.0" flutter: ">=1.20.0"