Skip to content

Commit

Permalink
chore(auth): ignore use of deprecated members (#4629)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan-Nelson authored Apr 1, 2024
1 parent c3b13bf commit 659ef3e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,15 @@ final class ASFDeviceInfoWindows extends ASFDeviceInfoPlatform {
});

@override
// TODO(Jordan-Nelson): Use new enums when min win32 version is v5.4.0 or
// higher
// ignore: deprecated_member_use
Future<int?> get screenHeightPixels async => GetSystemMetrics(SM_CYSCREEN);

@override
// TODO(Jordan-Nelson): Use new enums when min win32 version is v5.4.0 or
// higher
// ignore: deprecated_member_use
Future<int?> get screenWidthPixels async => GetSystemMetrics(SM_CXSCREEN);

@override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ import 'package:win32/win32.dart'
CryptUnprotectData,
CRYPT_INTEGER_BLOB,
GetLastError,
// TODO(Jordan-Nelson): Use new enums when min win32 version is v5.4.0 or
// higher
// ignore: deprecated_member_use
ERROR_SUCCESS;

/// Encrypts the provided string as a [Uint8List].
Expand Down Expand Up @@ -42,6 +45,9 @@ Uint8List encrypt(Uint8List list) {
encryptedPtr,
);
final errorCode = GetLastError();
// TODO(Jordan-Nelson): Use new enums when min win32 version is v5.4.0 or
// higher
// ignore: deprecated_member_use
if (errorCode != ERROR_SUCCESS) {
throw getExceptionFromErrorCode(errorCode);
}
Expand All @@ -68,6 +74,9 @@ Uint8List decrypt(Uint8List list) {
unencryptedPtr,
);
final errorCode = GetLastError();
// TODO(Jordan-Nelson): Use new enums when min win32 version is v5.4.0 or
// higher
// ignore: deprecated_member_use
if (errorCode != ERROR_SUCCESS) {
throw getExceptionFromErrorCode(errorCode);
}
Expand Down

0 comments on commit 659ef3e

Please sign in to comment.