Change path provider to ApplicationDocumentsDirectory
This commit is contained in:
parent
a854e48f5d
commit
f13d47a9e9
@ -20,9 +20,9 @@ class _FileDownloadState extends State<FileDownload> {
|
|||||||
late DownloaderCore core;
|
late DownloaderCore core;
|
||||||
|
|
||||||
void download(String remotePath, String name) async {
|
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(
|
DownloaderUtils options = DownloaderUtils(
|
||||||
progressCallback: (current, total) {
|
progressCallback: (current, total) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user