File tree 2 files changed +7
-10
lines changed 2 files changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -48,9 +48,8 @@ class AppAutoLauncherImplWindows extends AppAutoLauncher {
48
48
@override
49
49
Future <bool > enable () async {
50
50
_regKey.createValue (
51
- RegistryValue (
51
+ RegistryValue . string (
52
52
appName,
53
- RegistryValueType .string,
54
53
_registryValue,
55
54
),
56
55
);
@@ -60,7 +59,7 @@ class AppAutoLauncherImplWindows extends AppAutoLauncher {
60
59
bytes[0 ] = 2 ;
61
60
62
61
_startupApprovedRegKey
63
- .createValue (RegistryValue (appName, RegistryValueType .binary, bytes));
62
+ .createValue (RegistryValue .binary (appName , bytes));
64
63
65
64
return true ;
66
65
}
@@ -76,15 +75,13 @@ class AppAutoLauncherImplWindows extends AppAutoLauncher {
76
75
// Odd first byte will prevent the app from autostarting
77
76
// Empty or any other value will allow the app to autostart
78
77
Future <bool > _isStartupApproved () async {
79
- final value = _startupApprovedRegKey.getValue (appName);
78
+ final data = _startupApprovedRegKey.getBinaryValue (appName);
80
79
81
- if (value == null ) {
80
+ if (data == null ) {
82
81
return true ;
83
82
}
84
83
85
- final data = value.data;
86
-
87
- if (data is ! Uint8List || data.isEmpty) {
84
+ if (data.isEmpty) {
88
85
return true ;
89
86
}
90
87
Original file line number Diff line number Diff line change @@ -15,10 +15,10 @@ environment:
15
15
dependencies :
16
16
flutter :
17
17
sdk : flutter
18
- win32_registry : ^1.1.3
18
+ win32_registry : ^2.0.0
19
19
20
20
dev_dependencies :
21
21
dependency_validator : ^3.0.0
22
22
flutter_test :
23
23
sdk : flutter
24
- mostly_reasonable_lints : ^0.1.2
24
+ mostly_reasonable_lints : ^0.1.2
You can’t perform that action at this time.
0 commit comments