-
Notifications
You must be signed in to change notification settings - Fork 30.2k
[cross_file] Flutter app opened from runner debug directory or release directory does not save the files #130283
Copy link
Copy link
Closed
Labels
r: invalidIssue is closed as not validIssue is closed as not valid
Description
Is there an existing issue for this?
- I have searched the existing issues
- I have read the guide to filing a bug
Steps to reproduce
The issue is fully explained here: https://stackoverflow.com/questions/76649510/flutter-windows-app-from-windows-runner-does-not-save-the-new-file-to-a-path-in
Saving a file actually works when the app is started by flutter command either by flutter run or flutter run --release -d windows.
Expected results
It saves the file to the path specified as it works in debug mode
Actual results
Does not do anything, does not throw any error/exception
Code sample
Code sample
void funcExample({required String choseName, required String chosenPath, required UInt8List fileAsBytes,}) {
final docx = await DocxTemplate.fromBytes(fileAsBytes);
final docxGeneratedBytes = await someMethodThatChangesDocx(docx);
final path = "$chosenPath\\$chosenName.docx";
final XFile fileToBeSaved =
XFile.fromData(Uint8List.fromList(docxGeneratedBytes),name: chosenName);
await fileToBeSaved.saveTo(path);
}Screenshots or Video
Screenshots / Video demonstration
[Upload media here]
Logs
Logs
nothingFlutter Doctor output
Doctor output
flutter doctor --verbose: [√] Flutter (Channel stable, 3.7.12, on Microsoft Windows [Version 10.0.19045.3086], locale ro-RO) • Flutter version 3.7.12 on channel stable at C:\Users\Acer\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 4d9e56e694 (3 months ago), 2023-04-17 21:47:46 -0400 • Engine revision 1a65d409c7
• Dart version 2.19.6
• DevTools version 2.20.1
[√] Windows Version (Installed version of Windows is version 10 or higher)
[!] Android toolchain - develop for Android devices (Android SDK version 33.0.2) • Android SDK at C:\Users\Acer\AppData\Local\Android\sdk
X cmdline-tools component is missing
Run path/to/sdkmanager --install "cmdline-tools;latest"
See https://developer.android.com/studio/command-line for more details.
X Android license status unknown.
Run flutter doctor --android-licenses to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.
[√] Chrome - develop for the web
• Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
[√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.5.5)
• Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community • Visual Studio Community 2022 version 17.5.33627.172 • Windows 10 SDK version 10.0.22000.0
[√] Android Studio (version 2022.2) • Android Studio at C:\Program Files\Android\Android Studio • Flutter plugin can be installed from: https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-9586694)
[√] Connected device (3 available) • Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19045.3086] • Chrome (web) • chrome • web-javascript • Google Chrome 114.0.5735.199 • Edge (web) • edge • web-javascript • Microsoft Edge 114.0.1823.67
[√] HTTP Host Availability • All required HTTP hosts are available
! Doctor found issues in 1 categoryReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
r: invalidIssue is closed as not validIssue is closed as not valid