File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -48,9 +48,8 @@ class AppAutoLauncherImplWindows extends AppAutoLauncher {
4848 @override
4949 Future <bool > enable () async {
5050 _regKey.createValue (
51- RegistryValue (
51+ RegistryValue . string (
5252 appName,
53- RegistryValueType .string,
5453 _registryValue,
5554 ),
5655 );
@@ -60,7 +59,7 @@ class AppAutoLauncherImplWindows extends AppAutoLauncher {
6059 bytes[0 ] = 2 ;
6160
6261 _startupApprovedRegKey
63- .createValue (RegistryValue (appName, RegistryValueType .binary, bytes));
62+ .createValue (RegistryValue .binary (appName , bytes));
6463
6564 return true ;
6665 }
@@ -76,15 +75,13 @@ class AppAutoLauncherImplWindows extends AppAutoLauncher {
7675 // Odd first byte will prevent the app from autostarting
7776 // Empty or any other value will allow the app to autostart
7877 Future <bool > _isStartupApproved () async {
79- final value = _startupApprovedRegKey.getValue (appName);
78+ final data = _startupApprovedRegKey.getBinaryValue (appName);
8079
81- if (value == null ) {
80+ if (data == null ) {
8281 return true ;
8382 }
8483
85- final data = value.data;
86-
87- if (data is ! Uint8List || data.isEmpty) {
84+ if (data.isEmpty) {
8885 return true ;
8986 }
9087
You can’t perform that action at this time.
0 commit comments