Skip to content
pubscout

add_to_gallery

1.0.0, released 6 weeks ago by oodavid.com

Saves copies of images and videos to the Android Gallery and iOS Photos library.

$ flutter pub add add_to_gallery
Source repository

What it does

Copies local image and video files into the device's gallery or photo library under a specified album name and returns the new File instance. It handles recognized file extensions, supports scoped storage on Android, and runs operations safely.

AI-written summary of version 1.0.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to save captured or downloaded images and videos to the system gallery.
  • You want a straightforward way to organize saved media into a custom album on Android and iOS.

Skip it when

  • You need to query, search, or manage existing items inside the user's gallery or photo library.
  • You are trying to save raw remote HTTP/HTTPS URLs directly without downloading them first.

Strengths

  • Returns a File pointing to the saved media with an optional choice to preserve the original filename.
  • Unified behavior across both iOS and Android with background thread processing for large videos.
  • Leaves permission handling to external packages like permission_handler for flexible configuration.

Weaknesses

  • Does not download remote files automatically from HTTP URLs.
  • Does not manage permissions internally, requiring explicit manual setup.
  • Does not search or read existing items in the gallery.

Setup

Kind
Plugin (native code)
Effort
Low
Code generation
No
Direct dependencies
3

Requires configuring storage or photos permissions in AndroidManifest.xml and Info.plist depending on the target OS version.

File file = await AddToGallery.addToGallery(
  originalFile: File('/Some/Media/Path.jpg'),
  albumName: 'My Awesome App',
  deleteOriginalFile: false,
  keepFilename: true,
);
print("Saved to gallery with Path: ${file.path}");

Alternatives

Packages that do the same job and could replace add_to_gallery.

  • image

    If you need pure Dart image manipulation and processing without saving directly to the device gallery.

Works with

Packages commonly used together with add_to_gallery: ones it builds on, ones built on it, and its own family.