-
Notifications
You must be signed in to change notification settings - Fork 821
Closed as not planned
Labels
new issueAn issue that hasn't yet been seen from the maintainerAn issue that hasn't yet been seen from the maintainerstale
Description
Describe the bug
Reopening report 1590.
As stated, saveFileDialog returns a file path pointing to the download folder regardless of the directory picked by the user.
Workaround
A workaround is to send the file data directly through bytes, but if you intended to check on the saved file afterwards you will fail to do so.
But then, this will become incompatible with Desktop, because on windows it does return the correct folder but doesn't save the bytes contents automatically.
Platform
- Android
- iOS
- Web
- Desktop
How are you picking?
var fileName;
String data = 'this is the\n text file content';
final bytes = Uint8List.fromList(data.codeUnits);
//picks a folder and filename to save
fileName = await FilePicker.platform.saveFile(
bytes: bytes,
);
//saves in the correct folder but enforces returning string as the download folder
print('saveFile returned file: $fileName');
file saved in "/storage/emulated/0/myfolder/saved.txt"
output: "saveFile returned file:: /storage/emulated/0/Download/saved.txt"
Details to reproduce the issue
Brand new blank flutter project.
lumpsoid, amITranquil and bagusindrayana
Metadata
Metadata
Assignees
Labels
new issueAn issue that hasn't yet been seen from the maintainerAn issue that hasn't yet been seen from the maintainerstale