Skip to content

Commit b2164e7

Browse files
committed
Update plugin to use win32_registry version 2.0.0 and bump version to 0.4.0
1 parent c5a0427 commit b2164e7

File tree

8 files changed

+66
-59
lines changed

8 files changed

+66
-59
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- uses: subosito/flutter-action@v2
1515
with:
1616
channel: stable
17-
flutter-version: 3.22.2
17+
flutter-version: 3.29.1
1818
- run: |
1919
sudo apt-get update -y
2020
sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev
@@ -36,7 +36,7 @@ jobs:
3636
- uses: subosito/flutter-action@v2
3737
with:
3838
channel: stable
39-
flutter-version: 3.22.2
39+
flutter-version: 3.29.1
4040
- run: flutter build windows -v
4141
working-directory: example
4242

@@ -47,6 +47,6 @@ jobs:
4747
- uses: subosito/flutter-action@v2
4848
with:
4949
channel: stable
50-
flutter-version: 3.22.2
50+
flutter-version: 3.29.1
5151
- run: flutter build web -v
5252
working-directory: example

.github/workflows/lint.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ jobs:
1414
- uses: subosito/flutter-action@v2
1515
with:
1616
channel: "stable"
17+
flutter-version: 3.29.1
1718
- run: flutter analyze --fatal-infos
1819

1920
format:
@@ -23,6 +24,7 @@ jobs:
2324
- uses: subosito/flutter-action@v2
2425
with:
2526
channel: "stable"
27+
flutter-version: 3.29.1
2628
- run: dart format . --fix --set-exit-if-changed
2729

2830
dependency_validator:
@@ -32,5 +34,6 @@ jobs:
3234
- uses: subosito/flutter-action@v2
3335
with:
3436
channel: "stable"
37+
flutter-version: 3.29.1
3538
- run: flutter pub get
3639
- run: flutter pub run dependency_validator

.github/workflows/test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ jobs:
1515
- uses: subosito/flutter-action@v2
1616
with:
1717
channel: "stable"
18+
flutter-version: 3.29.1
1819
- run: flutter test --coverage
1920
- uses: codecov/codecov-action@v3
2021
with:

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.4.0
2+
3+
- Update plugin to use win32_registry version 2.0.0 #33
4+
15
## 0.3.1
26

37
- fix: web build error.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2023-2024 LiJianying <[email protected]>
3+
Copyright (c) 2023-present LiJianying <[email protected]>
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

example/pubspec.lock

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,18 @@ packages:
2121
dependency: transitive
2222
description:
2323
name: async
24-
sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
24+
sha256: d2872f9c19731c2e5f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63
2525
url: "https://pub.dev"
2626
source: hosted
27-
version: "2.11.0"
27+
version: "2.12.0"
2828
boolean_selector:
2929
dependency: transitive
3030
description:
3131
name: boolean_selector
32-
sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
32+
sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea"
3333
url: "https://pub.dev"
3434
source: hosted
35-
version: "2.1.1"
35+
version: "2.1.2"
3636
bot_toast:
3737
dependency: "direct main"
3838
description:
@@ -45,10 +45,10 @@ packages:
4545
dependency: transitive
4646
description:
4747
name: characters
48-
sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
48+
sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803
4949
url: "https://pub.dev"
5050
source: hosted
51-
version: "1.3.0"
51+
version: "1.4.0"
5252
cli_util:
5353
dependency: transitive
5454
description:
@@ -61,18 +61,18 @@ packages:
6161
dependency: transitive
6262
description:
6363
name: clock
64-
sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
64+
sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b
6565
url: "https://pub.dev"
6666
source: hosted
67-
version: "1.1.1"
67+
version: "1.1.2"
6868
collection:
6969
dependency: transitive
7070
description:
7171
name: collection
72-
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
72+
sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76"
7373
url: "https://pub.dev"
7474
source: hosted
75-
version: "1.18.0"
75+
version: "1.19.1"
7676
console:
7777
dependency: transitive
7878
description:
@@ -101,18 +101,18 @@ packages:
101101
dependency: transitive
102102
description:
103103
name: fake_async
104-
sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
104+
sha256: "6a95e56b2449df2273fd8c45a662d6947ce1ebb7aafe80e550a3f68297f3cacc"
105105
url: "https://pub.dev"
106106
source: hosted
107-
version: "1.3.1"
107+
version: "1.3.2"
108108
ffi:
109109
dependency: transitive
110110
description:
111111
name: ffi
112-
sha256: "493f37e7df1804778ff3a53bd691d8692ddf69702cf4c1c1096a2e41b4779e21"
112+
sha256: "289279317b4b16eb2bb7e271abccd4bf84ec9bdcbe999e278a94b804f5630418"
113113
url: "https://pub.dev"
114114
source: hosted
115-
version: "2.1.2"
115+
version: "2.1.4"
116116
flutter:
117117
dependency: "direct main"
118118
description: flutter
@@ -166,23 +166,23 @@ packages:
166166
path: ".."
167167
relative: true
168168
source: path
169-
version: "0.3.1"
169+
version: "0.4.0"
170170
leak_tracker:
171171
dependency: transitive
172172
description:
173173
name: leak_tracker
174-
sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a"
174+
sha256: c35baad643ba394b40aac41080300150a4f08fd0fd6a10378f8f7c6bc161acec
175175
url: "https://pub.dev"
176176
source: hosted
177-
version: "10.0.4"
177+
version: "10.0.8"
178178
leak_tracker_flutter_testing:
179179
dependency: transitive
180180
description:
181181
name: leak_tracker_flutter_testing
182-
sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8"
182+
sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573
183183
url: "https://pub.dev"
184184
source: hosted
185-
version: "3.0.3"
185+
version: "3.0.9"
186186
leak_tracker_testing:
187187
dependency: transitive
188188
description:
@@ -203,26 +203,26 @@ packages:
203203
dependency: transitive
204204
description:
205205
name: matcher
206-
sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb
206+
sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2
207207
url: "https://pub.dev"
208208
source: hosted
209-
version: "0.12.16+1"
209+
version: "0.12.17"
210210
material_color_utilities:
211211
dependency: transitive
212212
description:
213213
name: material_color_utilities
214-
sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a"
214+
sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
215215
url: "https://pub.dev"
216216
source: hosted
217-
version: "0.8.0"
217+
version: "0.11.1"
218218
meta:
219219
dependency: transitive
220220
description:
221221
name: meta
222-
sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136"
222+
sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c
223223
url: "https://pub.dev"
224224
source: hosted
225-
version: "1.12.0"
225+
version: "1.16.0"
226226
mostly_reasonable_lints:
227227
dependency: "direct dev"
228228
description:
@@ -267,10 +267,10 @@ packages:
267267
dependency: transitive
268268
description:
269269
name: path
270-
sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
270+
sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5"
271271
url: "https://pub.dev"
272272
source: hosted
273-
version: "1.9.0"
273+
version: "1.9.1"
274274
petitparser:
275275
dependency: transitive
276276
description:
@@ -307,55 +307,55 @@ packages:
307307
dependency: transitive
308308
description: flutter
309309
source: sdk
310-
version: "0.0.99"
310+
version: "0.0.0"
311311
source_span:
312312
dependency: transitive
313313
description:
314314
name: source_span
315-
sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
315+
sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c"
316316
url: "https://pub.dev"
317317
source: hosted
318-
version: "1.10.0"
318+
version: "1.10.1"
319319
stack_trace:
320320
dependency: transitive
321321
description:
322322
name: stack_trace
323-
sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
323+
sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1"
324324
url: "https://pub.dev"
325325
source: hosted
326-
version: "1.11.1"
326+
version: "1.12.1"
327327
stream_channel:
328328
dependency: transitive
329329
description:
330330
name: stream_channel
331-
sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
331+
sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d"
332332
url: "https://pub.dev"
333333
source: hosted
334-
version: "2.1.2"
334+
version: "2.1.4"
335335
string_scanner:
336336
dependency: transitive
337337
description:
338338
name: string_scanner
339-
sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
339+
sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43"
340340
url: "https://pub.dev"
341341
source: hosted
342-
version: "1.2.0"
342+
version: "1.4.1"
343343
term_glyph:
344344
dependency: transitive
345345
description:
346346
name: term_glyph
347-
sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
347+
sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e"
348348
url: "https://pub.dev"
349349
source: hosted
350-
version: "1.2.1"
350+
version: "1.2.2"
351351
test_api:
352352
dependency: transitive
353353
description:
354354
name: test_api
355-
sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f"
355+
sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd
356356
url: "https://pub.dev"
357357
source: hosted
358-
version: "0.7.0"
358+
version: "0.7.4"
359359
typed_data:
360360
dependency: transitive
361361
description:
@@ -376,10 +376,10 @@ packages:
376376
dependency: transitive
377377
description:
378378
name: vm_service
379-
sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec"
379+
sha256: "0968250880a6c5fe7edc067ed0a13d4bae1577fe2771dcf3010d52c4a9d3ca14"
380380
url: "https://pub.dev"
381381
source: hosted
382-
version: "14.2.1"
382+
version: "14.3.1"
383383
web:
384384
dependency: transitive
385385
description:
@@ -392,18 +392,18 @@ packages:
392392
dependency: transitive
393393
description:
394394
name: win32
395-
sha256: "0a989dc7ca2bb51eac91e8fd00851297cfffd641aa7538b165c62637ca0eaa4a"
395+
sha256: b89e6e24d1454e149ab20fbb225af58660f0c0bf4475544650700d8e2da54aef
396396
url: "https://pub.dev"
397397
source: hosted
398-
version: "5.4.0"
398+
version: "5.11.0"
399399
win32_registry:
400400
dependency: transitive
401401
description:
402402
name: win32_registry
403-
sha256: "10589e0d7f4e053f2c61023a31c9ce01146656a70b7b7f0828c0b46d7da2a9bb"
403+
sha256: "6f1b564492d0147b330dd794fee8f512cec4977957f310f9951b5f9d83618dae"
404404
url: "https://pub.dev"
405405
source: hosted
406-
version: "1.1.3"
406+
version: "2.1.0"
407407
xml:
408408
dependency: transitive
409409
description:
@@ -421,5 +421,5 @@ packages:
421421
source: hosted
422422
version: "3.1.2"
423423
sdks:
424-
dart: ">=3.3.0 <4.0.0"
424+
dart: ">=3.7.0 <4.0.0"
425425
flutter: ">=3.19.0"

lib/src/app_auto_launcher_impl_windows.dart

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class AppAutoLauncherImplWindows extends AppAutoLauncher {
4040

4141
@override
4242
Future<bool> isEnabled() async {
43-
String? value = _regKey.getValueAsString(appName);
43+
String? value = _regKey.getStringValue(appName);
4444

4545
return value == _registryValue && await _isStartupApproved();
4646
}
@@ -58,8 +58,7 @@ class AppAutoLauncherImplWindows extends AppAutoLauncher {
5858
// "2" as a first byte in this register means that the autostart is enabled
5959
bytes[0] = 2;
6060

61-
_startupApprovedRegKey
62-
.createValue(RegistryValue.binary(appName, bytes));
61+
_startupApprovedRegKey.createValue(RegistryValue.binary(appName, bytes));
6362

6463
return true;
6564
}
@@ -75,17 +74,17 @@ class AppAutoLauncherImplWindows extends AppAutoLauncher {
7574
// Odd first byte will prevent the app from autostarting
7675
// Empty or any other value will allow the app to autostart
7776
Future<bool> _isStartupApproved() async {
78-
final data = _startupApprovedRegKey.getBinaryValue(appName);
77+
final value = _startupApprovedRegKey.getBinaryValue(appName);
7978

80-
if (data == null) {
79+
if (value == null) {
8180
return true;
8281
}
8382

84-
if (data.isEmpty) {
83+
if (value.isEmpty) {
8584
return true;
8685
}
8786

88-
return data[0].isEven;
87+
return value[0].isEven;
8988
}
9089

9190
void _removeValue(RegistryKey key, String value) {

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: launch_at_startup
22
description: This plugin allows Flutter desktop apps to Auto launch on startup / login.
3-
version: 0.3.1
3+
version: 0.4.0
44
homepage: https://github.com/leanflutter/launch_at_startup
55

66
platforms:

0 commit comments

Comments
 (0)