flutter_secure_storage
                                
                                 flutter_secure_storage copied to clipboard
                                
                                    flutter_secure_storage copied to clipboard
                            
                            
                            
                        flutter_secure_storage does not work on Windows.
Hello, the package show a error when try launch on Windows.
Platform: Windows Package version: 5.0.2
This is my pubspec.yaml file:
name: pharmacy_billing_system
description: A new Flutter project.
publish_to: 'none' 
version: 1.0.0+1
environment:
  sdk: ">=2.16.1 <3.0.0"
dependencies:
  flutter:
    sdk: flutter
  flutter_secure_storage: ^5.0.2
  get: ^4.6.1
  google_fonts: ^2.3.1
  http: ^0.13.4
  responsive_design: ^0.0.21
dev_dependencies:
  flutter_test:
    sdk: flutter
  lint: ^1.8.2
flutter:
  uses-material-design: true
Just declare the package, I'm not using it yet but I'm getting the following error.
Launching lib\main.dart on Windows in debug mode...
lib\main.dart:1
[D:\Users\Alex\Documents\FlutterProjects\pharmacy_billing_system\windows\flutter\ephemeral\.plugin_symlinks\flutter_secure_storage_windows\windows\flutter_secure_storage_windows_plugin.cpp]()(6,10): fatal error C1083: Cannot open include file: 'atlstr.h': No such file or directory [[D:\Users\Alex\Documents\FlutterProjects\pharmacy_billing_system\build\windows\plugins\flutter_secure_storage_windows\flutter_secure_storage_windows_plugin.vcxproj]()]
Exception: Build process failed.
Exited (sigterm)

The software works fine if I remove the dependency from my pubspec.yaml.
Help with this error
Hello, the package show a error when try launch on Windows.
Platform: Windows Package version: 5.0.2
This is my pubspec.yaml file:
name: pharmacy_billing_system description: A new Flutter project. publish_to: 'none' version: 1.0.0+1 environment: sdk: ">=2.16.1 <3.0.0" dependencies: flutter: sdk: flutter flutter_secure_storage: ^5.0.2 get: ^4.6.1 google_fonts: ^2.3.1 http: ^0.13.4 responsive_design: ^0.0.21 dev_dependencies: flutter_test: sdk: flutter lint: ^1.8.2 flutter: uses-material-design: trueJust declare the package, I'm not using it yet but I'm getting the following error.
Launching lib\main.dart on Windows in debug mode... lib\main.dart:1 [D:\Users\Alex\Documents\FlutterProjects\pharmacy_billing_system\windows\flutter\ephemeral\.plugin_symlinks\flutter_secure_storage_windows\windows\flutter_secure_storage_windows_plugin.cpp]()(6,10): fatal error C1083: Cannot open include file: 'atlstr.h': No such file or directory [[D:\Users\Alex\Documents\FlutterProjects\pharmacy_billing_system\build\windows\plugins\flutter_secure_storage_windows\flutter_secure_storage_windows_plugin.vcxproj]()] Exception: Build process failed. Exited (sigterm)
The software works fine if I remove the dependency from my pubspec.yaml.
Help with this error.
You need to install [Visual Studio 2022 Community] as explained here: https://docs.flutter.dev/get-started/install/windows#additional-windows-requirements
You need to install [Visual Studio 2022 Community] as explained here: https://docs.flutter.dev/get-started/install/windows
I have installed Visual Studio, the app work correctly in Windows if delete the package, when add package the app breaks
I have the same error which this package. Visual Studio and "Desktop development with C++" are installed and in general Windows builds for Flutter do work.
Hi, I also have this issue, I'm using VSCode with Flutter 3.0.0 and updated extension, the Windows build works fine, but after adding the package flutter_secure_storage my app stop working and show the same message above.
Install the individual components of 'atlstr.h' as shown in the video: https://www.youtube.com/watch?v=Lq3SllRv7a8
If you have bad UTF-8 issues, go to: https://github.com/flutter/flutter/issues/102451#issuecomment-1124651845
Install the individual components of 'atlstr.h' as shown in the video: https://www.youtube.com/watch?v=Lq3SllRv7a8
If you have bad UTF-8 issues, go to: flutter/flutter#102451 (comment)
This worked for me. Thanks man!
You need to install [Visual Studio 2022 Community] as explained here: https://docs.flutter.dev/get-started/install/windows
Moving to VS 2022 worked for me, Thanks man
I successfully run the app after adding this in "Visual Studio Build Tools 2022" installation.
Open Visual Studio Installer, click modify in existing installation, see optional items in right panel

C++ ATL is enough btw
C++ MFC is not required to build
I was able to patch the package within VS Code on windows to build for windows desktop. I plan to add my process in a following comment.
Alright. I have linked an example with the solution in the README.md for ease of access. https://github.com/Glitched-Manual/quick_secure_storage_patch
quick_secure_storage_patch
Editor: VS Code
Create a new Flutter project
- If you already. Skip this step.
Open a new terminal in VS Code
Install flutter_secure_storage:
flutter pub add flutter_secure_storage
Add the flutter_secure_storage import
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
Run windows desktop build
- Project will fail (thats fine)
Run the following commands to copy files to where they are needed
cp "windows/flutter/ephemeral/.plugin_symlinks/flutter_secure_storage_windows/windows/*.*" "windows/flutter/ephemeral/"
cp "windows/flutter/ephemeral/atls.lib" "build/windows/x64/plugins/flutter_secure_storage_windows/"
Run windows desktop build (twice) ((yes run 2 times))
- And you are done.
The issue does not take long to solve. What is happening:
On getting the fatal error C1083: Cannot open include file: 'atlstr.h'.
The builder just not able to find the package CPP files needed.
After installing flutter_secure_storage. with:
flutter pub add flutter_secure_storage
The files needed are located in /your_flutter_project_path/windows/flutter/ephemeral/.plugin_symlinks/flutter_secure_storage_windows/windows/
The .cpp , .h , .dll, and .lib files need to be copied to /your_flutter_project_path/windows/flutter/ephemeral/
Then 'atls.lib' needs to be copied to the location of the flutter_secure_storage_windows_plugin.vcxproj file:
/your_flutter_project_path/build/windows/x64/plugins/flutter_secure_storage_windows/
Then running the debugger builds and object file that is needed.
Then you are in the clear.
*******This Issue Can be Closed *******