From f13d47a9e988f2bfb18dfef869be83ae80415c6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elias=20M=C3=BCller?= Date: Sat, 11 Mar 2023 21:07:23 +0100 Subject: [PATCH] Change path provider to ApplicationDocumentsDirectory --- lib/screen/pages/files/fileDownload.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/screen/pages/files/fileDownload.dart b/lib/screen/pages/files/fileDownload.dart index e600ab9..0ed9a65 100644 --- a/lib/screen/pages/files/fileDownload.dart +++ b/lib/screen/pages/files/fileDownload.dart @@ -20,9 +20,9 @@ class _FileDownloadState extends State { late DownloaderCore core; void download(String remotePath, String name) async { - List? 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) {