Change path provider to ApplicationDocumentsDirectory

This commit is contained in:
Elias Müller 2023-03-11 21:07:23 +01:00
parent a854e48f5d
commit f13d47a9e9

View File

@ -20,9 +20,9 @@ class _FileDownloadState extends State<FileDownload> {
late DownloaderCore core;
void download(String remotePath, String name) async {
List<Directory>? paths = await getExternalStorageDirectories(type: StorageDirectory.downloads);
Directory paths = await getApplicationDocumentsDirectory();
String local = paths!.first.path + Platform.pathSeparator + name;
String local = paths.path + Platform.pathSeparator + name;
DownloaderUtils options = DownloaderUtils(
progressCallback: (current, total) {