Skip to content

Commit

Permalink
0.1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
lijy91 committed Feb 20, 2022
1 parent 76059ba commit daeb4cc
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 17 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.1.4

- `pubspec.yaml` adds platforms field.

## 0.1.3

- #3 Fix No such file or directory error.
Expand Down
10 changes: 5 additions & 5 deletions README-ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@

```yaml
dependencies:
launch_at_startup: ^0.1.3
launch_at_startup: ^0.1.4
```
Expand All @@ -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());
}
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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());
}
Expand Down
6 changes: 3 additions & 3 deletions example/lib/pages/home.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@ class _HomePageState extends State<HomePage> {
}

_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();
}

Expand Down
11 changes: 9 additions & 2 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ packages:
path: ".."
relative: true
source: path
version: "0.1.3"
version: "0.1.4"
lints:
dependency: transitive
description:
Expand All @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 2 additions & 0 deletions lib/src/launch_at_startup.dart
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,5 @@ class LaunchAtStartup {

Future<bool> isEnabled() => _appAutoLauncher.isEnabled();
}

final launchAtStartup = LaunchAtStartup.instance;
9 changes: 8 additions & 1 deletion pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
7 changes: 6 additions & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down

0 comments on commit daeb4cc

Please sign in to comment.