downloadsfolder
1.2.0, released 2 years ago by siyoutechnology.com
Retrieve download folder paths and copy files into downloads on mobile and desktop.
What it does
Retrieves the path to the platform's downloads directory, copies files into the download folder with unique names, and opens the download folder in the system's file explorer. Supports Android, iOS, Windows, macOS, and Linux.
AI-written summary of version 1.2.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to save downloaded files directly to the device's downloads folder.
- You need to open the system downloads folder from your Flutter application.
Skip it when
- You are looking for a general file picker dialog (use file_picker instead).
- You want to manage app-specific temporary or document storage (use path_provider instead).
Strengths
- Supports cross-platform download folder path retrieval and opening.
- Handles unique file naming automatically when copying files to avoid overwrites.
- Bypasses MANAGE_EXTERNAL_STORAGE restrictions on Android 29+ using MediaStore.
Weaknesses
- Does not manage write permissions automatically as of version 1.2.0 (requires manual handling).
- Requires platform-specific configuration for iOS and macOS (entitlements and Info.plist keys).
Setup
- Kind
- Plugin (native code)
- Effort
- Medium
- Code generation
- No
- Direct dependencies
- 5
Requires Android permission configurations for older SDKs, Info.plist updates for iOS, and entitlements configuration for macOS.
import 'package:downloadsfolder/downloadsfolder.dart';
void main() async {
try {
Directory downloadDirectory = await getDownloadDirectory();
print('Downloads folder path: ${downloadDirectory.path}');
} catch (e) {
print('Failed to retrieve downloads folder path $e');
}
}Alternatives
Packages that do the same job and could replace downloadsfolder.
- file_picker
If your main requirement is letting users pick files or save files via native dialogs.
93Compare
Works with
Packages commonly used together with downloadsfolder: ones it builds on, ones built on it, and its own family.
- plugin_platform_interfacedownloadsfolder depends on itReusable base class for platform interfaces of Flutter federated plugins.
- path_providerdownloadsfolder depends on itProvides Flutter APIs to locate common filesystem directories on Android, iOS, macOS, Linux and Windows.
- dartxdownloadsfolder depends on itCollection of useful static extension methods for Dart core types.
- diacriticdownloadsfolder depends on itRemoves common accents and diacritical signs from strings.