flutter_downloader
flutter_downloader copied to clipboard
Directory(savedDir).existsSync()
I've added as per this #249 I've added all params. I want to download this to internal storage. My code is
var localPath = await getApplicationDocumentsDirectory(); // /data/user/0/com.example.app/app_flutter var fileName = "landscapeVid.mp4";
await FlutterDownloader.enqueue( url: url, savedDir: localPath.toString(), showNotification: true, fileName: fileName, openFileFromNotification: true, saveInPublicStorage: false );
getting this error : 'package:flutter_downloader/src/downloader.dart': Failed assertion: line 107 pos 12: 'Directory(savedDir).existsSync()': savedDir does not exist
it's an app-directory, not the path, try to use a path like that..
var localDirectory = await getApplicationDocumentsDirectory();
savedDir: : localDirectory.path; // not .toString()
it's an app-directory, not the path, try to use a path like that..
var localDirectory = await getApplicationDocumentsDirectory();
savedDir: : localDirectory.path; // not .toString()
Good job bro, thanks