Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to win32 5.5.4 #780

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions flutter_secure_storage_windows/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## NEXT
Migrates to `win32` version 5.5.4 to support Dart 3.4 / Flutter 3.22.0.

## 3.1.2
Reverts onCupertinoProtectedDataAvailabilityChanged and isCupertinoProtectedDataAvailable.

Expand Down
4 changes: 2 additions & 2 deletions flutter_secure_storage_windows/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ description: Demonstrates how to use the flutter_secure_storage_windows plugin.
publish_to: 'none'

environment:
sdk: '>=2.12.0 <3.0.0'
flutter: ">=2.0.0"
sdk: '>=3.4.0 <4.0.0'
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This aligns the windows example with the windows implementation.

flutter: '>=3.22.0'

dependencies:
flutter:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,9 +246,7 @@ class DpapiJsonFileMapStorage extends MapStorage {

if (plainTextBlob.ref.pbData.address == NULL) {
throw WindowsException(
// TODO: New member requires win32 ^5.4.0
// ignore: deprecated_member_use
ERROR_OUTOFMEMORY,
WIN32_ERROR.ERROR_OUTOFMEMORY,
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These TODO's can now be addressed.

message: 'Failure on CryptUnprotectData()',
);
}
Expand Down Expand Up @@ -350,9 +348,7 @@ class DpapiJsonFileMapStorage extends MapStorage {

if (encryptedTextBlob.ref.pbData.address == NULL) {
throw WindowsException(
// TODO: New member requires win32 ^5.4.0
// ignore: deprecated_member_use
ERROR_OUTOFMEMORY,
WIN32_ERROR.ERROR_OUTOFMEMORY,
message: 'Failure on CryptProtectData()',
);
}
Expand Down
6 changes: 3 additions & 3 deletions flutter_secure_storage_windows/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ repository: https://github.com/mogol/flutter_secure_storage
version: 3.1.2

environment:
sdk: '>=2.12.0 <4.0.0'
flutter: ">=2.0.0"
sdk: '>=3.4.0 <4.0.0'
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the last two Flutter releases (3.22.0 and 3.24.0) are way ahead of the current version range, I opted into updating it here, to match the Dart 3.4.0 requirement for win32.

flutter: '>=3.22.0'

dependencies:
ffi: ^2.0.0
Expand All @@ -14,7 +14,7 @@ dependencies:
flutter_secure_storage_platform_interface: ^1.1.0
path: ^1.8.0
path_provider: ^2.0.0
win32: ^5.0.0
win32: ^5.5.4

dev_dependencies:
flutter_test:
Expand Down