Change path provider to ApplicationDocumentsDirectory
This commit is contained in:
		@@ -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) {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user