mediagetter 0.0.4 copy "mediagetter: ^0.0.4" to clipboard
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 #

pub package License: MIT

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

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 #

1
likes
120
points
156
downloads
screenshot

Publisher

unverified uploader

Weekly Downloads

The ultimate Flutter media picker & file manager. Retrieve images, videos, audio, and documents from Android/iOS. Supports sort, filter, and keyword search.

Repository (GitHub)
View/report issues

Topics

#media-picker #file-manager #gallery #images #videos

Documentation

Documentation
API reference

License

unknown (license)

Dependencies

flutter, permission_handler, plugin_platform_interface

More

Packages that depend on mediagetter

Packages that implement mediagetter