Skip to content

chore: update version numbers and dependencies for flutter_secure_sto…#1096

Open
SunnatilloShavkatov wants to merge 6 commits intojuliansteenbakker:developfrom
SunnatilloShavkatov:win32
Open

chore: update version numbers and dependencies for flutter_secure_sto…#1096
SunnatilloShavkatov wants to merge 6 commits intojuliansteenbakker:developfrom
SunnatilloShavkatov:win32

Conversation

@SunnatilloShavkatov
Copy link
Copy Markdown

This pull request updates dependencies across multiple packages in the flutter_secure_storage ecosystem, introduces compatibility fixes for Windows, and includes minor code and documentation improvements. The main focus is on ensuring compatibility with newer versions of dependencies and addressing platform-specific issues.

Dependency Updates and Compatibility:

  • Updated plugin_platform_interface, flutter_secure_storage_platform_interface, and other dependencies in pubspec.yaml files across all packages to ensure compatibility with newer versions and improve stability. This includes bumping versions for ffi, win32, meta, mocktail, mockito, very_good_analysis, path, and path_provider. [1] [2] [3] [4] [5] [6] [7] [8]

  • Updated the flutter_secure_storage_web and flutter_secure_storage_windows package versions to reflect the changes and fixes. [1] [2]

Windows Platform Fixes:

  • Fixed DPAPI FFI calls in flutter_secure_storage_windows for compatibility with win32 6.0.0, including changes to error handling and memory management in flutter_secure_storage_windows_ffi.dart. [1] [2] [3] [4] [5]

Web Platform Improvements:

  • Improved the deleteAll method in flutter_secure_storage_web.dart by using a more concise functional style for removing items.
  • Updated the changelog to document a fix for potential key skipping in readAll when storage is modified concurrently.

Build System and Plugin Registration:

  • Added jni to the FFI plugin lists for Linux and Windows example builds to support FFI plugins. [1] [2]

These changes collectively improve package stability, maintain compatibility with the latest dependencies, and address platform-specific issues, especially for Windows users.

Copy link
Copy Markdown
Owner

@juliansteenbakker juliansteenbakker left a comment

Choose a reason for hiding this comment

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

Thank you for the changes!

description: Windows implementation of flutter_secure_storage. Please use flutter_secure_storage instead of this package.
repository: https://github.com/mogol/flutter_secure_storage
version: 4.1.0
version: 4.1.1
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

We should change this to 4.2.0 since the win32 upgrade is a breaking change update.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Good catch — updated to 4.2.0 since the win32 upgrade is a breaking change.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 22, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.99%. Comparing base (bd52c9c) to head (1c4d1b8).

Additional details and impacted files
@@            Coverage Diff             @@
##             develop    #1096   +/-   ##
==========================================
  Coverage      96.99%   96.99%           
  Complexity       146      146           
==========================================
  Files             17       17           
  Lines            533      533           
  Branches          48       48           
==========================================
  Hits             517      517           
  Misses             9        9           
  Partials           7        7           
Flag Coverage Δ
android 95.91% <ø> (ø)
flutter 99.39% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread flutter_secure_storage/pubspec.yaml Outdated
Co-authored-by: TitouanBourveauEXFO <135720545+TitouanBourveauEXFO@users.noreply.github.com>
@hnvn
Copy link
Copy Markdown
Contributor

hnvn commented Apr 24, 2026

@juliansteenbakker can you approve this PR? This package blocks our project from upgrading to new version of other packages

@rekire
Copy link
Copy Markdown

rekire commented Apr 26, 2026

JFYI I added this branch as dependency for testing and get this exception now:

[ERROR:flutter/runtime/dart_vm_initializer.cc(40)] Unhandled Exception: Invalid argument(s): Couldn't resolve native function 'CryptUnprotectData_Wrapper' in 'package:win32/win32.dart' : Failed to load dynamic library 'win32_windows_x64.dll': Failed to load dynamic library 'win32_windows_x64.dll': error code 126.

#0      Native._ffi_resolver.#ffiClosure0 (dart:ffi-patch/ffi_patch.dart)
#1      Native._ffi_resolver_function (dart:ffi-patch/ffi_patch.dart:1943:20)
#2      _CryptUnprotectData_Wrapper$Method$FfiNative (package:win32/src/_internal/crypt32.g.dart)
#3      CryptUnprotectData_Wrapper (package:win32/src/_internal/crypt32.g.dart:68:28)
#4      CryptUnprotectData (package:win32/src/win32/crypt32.g.dart:93:19)
#5      DpapiJsonFileMapStorage.load.<anonymous closure> (package:flutter_secure_storage_windows/src/flutter_secure_storage_windows_ffi.dart:301:13)
#6      using (package:ffi/src/arena.dart:127:31)
#7      DpapiJsonFileMapStorage.load (package:flutter_secure_storage_windows/src/flutter_secure_storage_windows_ffi.dart:285:19)

Did you test your changes on Windows?

I tested your changes by changing the dependencies like this:

dependencies:
  # ...
  flutter_secure_storage:
    git:
      url: https://github.com/juliansteenbakker/flutter_secure_storage.git
      ref: 46496f13a08893ee78530dabdcb5476a6167e5b3 # the latest commit from you
      path: flutter_secure_storage
  flutter_secure_storage_windows:
    git:
      url: https://github.com/juliansteenbakker/flutter_secure_storage.git
      ref: 46496f13a08893ee78530dabdcb5476a6167e5b3
      path: flutter_secure_storage_windows

Or is there anything else I need to replace in order to test your changes?

@juliansteenbakker
Copy link
Copy Markdown
Owner

Did you test your changes on Windows?

I haven't yet, i'm keen on getting #1093 merged first before this, in order to automatically pick up issues like this. Thanks for testing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants