You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
It would either give an exception, or I could send the file contents using the bytes which is a shady undocumented parameter. But even so, it wouldn't return the correct folder where the file was saved.
Tried to look into the code but it seemed very complex with almost no comments, so I couldn't figure out yet why it stopped working, even though I'm almost sure it wasn't like this in the past. My guess is that some recent updates broke this feature on android.
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
How are you picking?
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.
The text was updated successfully, but these errors were encountered: