Failed assertion: line 74 pos 12: 'Directory(savedDir).existsSync()': is not true.
See original GitHub issueI’m doing everything like the repo example:
String localPath = (await _findLocalPath()) + Platform.pathSeparator + 'Download';
print(localPath);
await FlutterDownloader.enqueue(
url: "https://cdn.pixabay.com/photo/2016/09/05/10/50/app-1646213_960_720.png",
savedDir: localPath,
showNotification: true, // show download progress in status bar (for Android)
openFileFromNotification: true, // click on notification to open downloaded file (for Android)
);
localPath
printed value is :
/storage/emulated/0/Android/data/com.getinshoot.getinshoot/files/Download
I still have the error:
Failed assertion: line 74 pos 12: ‘Directory(savedDir).existsSync()’: is not true.
Any idea what’s happening?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:5
- Comments:5
Top Results From Across the Web
flutter - 'file.existsSync()': is not true - Stack Overflow
The error says it, the file doesn't exists, before doing that you should check if the file is there or create it if...
Read more >existsSync method - FileSystemEntity class - dart:io library
Calling existsSync on an instance of one of these subclasses checks whether the object exists in the file system object exists and is...
Read more >[Solved]-'file.existsSync()': is not true-Flutter - appsloveworld
The error says it, the file doesn't exists, before doing that you should check if the file is there or create it if...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I forgot to actually create this directory before.
Some delay to after getting localpath solved my problem.