If you’re using the downloads_path_provider package and saving files to:
/storage/emulated/0/Download
…this is the correct path for both emulators and real Android devices. However, if files don’t appear in the Downloads folder on real devices, there are a few important things to understand and address.
You must request runtime permissions to write to external storage:
Add this to your AndroidManifest.xml:
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
Request permission at runtime using permission_handler:
await Permission.storage.request();
From Android 11 (API level 30), apps cannot freely access /storage/emulated/0/Download unless using MediaStore APIs or asking for MANAGE_EXTERNAL_STORAGE (not recommended due to Play Store restrictions).
Instead, consider:
Sometimes, saved files don’t show up in the Downloads app right away. You can manually trigger media scan:
import 'package:external_path/external_path.dart';
import 'package:media_scanner/media_scanner.dart';
await MediaScanner.loadMedia(path: filePath);
Work with our skilled Flutter developers to accelerate your project and boost its performance.
Hire Flutter Developers