mediagetter 0.0.4
mediagetter: ^0.0.4 copied to clipboard
The ultimate Flutter media picker & file manager. Retrieve images, videos, audio, and documents from Android/iOS. Supports sort, filter, and keyword search.
Media Getter for Flutter #
- ๐ updated by livedbs (Free Live Database, Storage)
- https://livedbs.web.app
The ultimate Flutter plugin for retrieving images, videos, audio, and files from Android and iOS device storage.
media getter acts as a powerful Media Picker and File Manager backend, allowing you to build custom galleries, file explorers, and media selection interfaces with ease. It supports Android 13+ permissions and iOS Photo Library access out of the box.
๐ Key Features #
- โก Cross-Platform: Seamlessly retrieve media on Android and iOS.
- ๐ผ๏ธ Gallery Access: Get all Images and Videos with metadata (size, dimensions, duration).
- ๐ต Audio Retriever: Fetch music and audio files with album art support.
- ๐ Document Scanner: Automatically find PDFs, Word docs, Excel sheets, and more.
- ๐ Smart Search: Built-in keyword search to find files by name instantly.
- ๐ Download Folder: Access the native Downloads directory on Android.
- ๐ธ DCIM & Camera Roll: Direct access to camera photos and videos.
- ๐งน Storage Management: Delete files directly from the app (where supported).
- ๐๏ธ Sorting & Filtering: Sort by Name, Size, or Date. Filter by extension or folder.
- Usage Demo

Features #
- Get All Images: Fetch images with metadata.
- Get All Videos: Fetch videos with thumbnails/metadata.
- Get All Audios: Fetch audio files.
- Get All Documents: Fetch common document formats (PDF, DOC, XLS, PPT, TXT).
- custom Files: Fetch files by specific extensions.
- Get DCIM/Camera Roll: Access captured photos and videos.
- Get Downloads: Access the Downloads folder (Android) or Documents (iOS).
- Search: Search all media types by filename keyword.
- Delete Files: Delete files from storage (where supported).
- Toasts: Show native toast notifications (Android only).
Platform Support #
| Feature | Android | iOS |
|---|---|---|
| All Media Getters | โ | โ |
| Keyword Search | โ | โ |
| File Deletion | โ | โ |
| Toasts | โ | โ |
Setup #
Android #
Add the necessary permissions to your android/app/src/main/AndroidManifest.xml:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.your_app">
<!-- Permissions for Android 12 and below -->
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<!-- Permissions for Android 13+ -->
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />
<uses-permission android:name="android.permission.READ_MEDIA_AUDIO" />
<!-- Optional: For access to all files (requires special review on Play Store) -->
<!-- <uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" /> -->
</manifest>
iOS #
Add the following keys to your ios/Runner/Info.plist:
<key>NSPhotoLibraryUsageDescription</key>
<string>This app requires access to the photo library to fetch and display photos and videos.</string>
Usage #
Import the package:
import 'package:mediagetter/mediagetter.dart';
Initialize the instance:
final mediaGetter = MediaGetter();
1. Get Images #
// Get last 10 images containing "vacation" in the name
final images = await mediaGetter.getAllImages(
limit: 10,
keyword: "vacation",
orderByDesc: true,
fromDate: DateTime.now().subtract(const Duration(days: 30)),
);
for (var img in images) {
print("Image: ${img.name}, Path: ${img.uri}");
}
2. Get Videos #
final videos = await mediaGetter.getAllVideos();
3. Get Audio #
final audios = await mediaGetter.getAllAudios();
4. Get Documents & Files #
// Get PDF and Text files
final files = await mediaGetter.getAllFiles(
fileExtensions: ['pdf', 'txt'],
limit: 20
);
// OR use the convenience method for common docs
final docs = await mediaGetter.getAllDocuments();
5. Get DCIM (Camera Roll) #
final dcimItems = await mediaGetter.getDCIM();
6. Get Downloads #
final downloads = await mediaGetter.getDownloadFolderItems();
7. Other Actions #
// Delete a file
bool deleted = await mediaGetter.deleteFile(filePath: "/path/to/file");
// Show Toast (Android only)
await mediaGetter.showToast("Files loaded!", length: ToastLength.short);
Our Other Packages #
- LiveDB: A powerful local database with reactive streams.
- Media Link Generator: Generate direct download links for cloud storage.
- Contacts Getter: Access and manage device contacts.
- Timer Widget: All-in-one timer/loading widget.
