Back to Projects
Flutter PackagesActive

just_save_gallery

A lightweight Flutter plugin that just saves images and videos to the device gallery

dartflutter

Pub Version License

Overview

just_save_gallery is a Flutter plugin that does exactly what its name says — it just saves images and videos to the device gallery. No reading, no deleting, no listing. It supports both Uint8List byte data and file path inputs, and works on Android and iOS.

Key Features

  • Save from bytes: Save images and videos directly from Uint8List to the gallery
  • Save from file path: Pass a file path and the media type is auto-detected from the extension (memory-efficient for large videos)
  • Custom album support: Specify a custom album/folder name for saved media
  • Auto file name numbering: Automatically appends numbers to avoid duplicate file name conflicts
  • Built-in permission handling: Automatically requests permissions on save, with opt-out via requestPermission: false
  • Typed error handling: SaveException and SaveErrorCode let you distinguish between permission denied, disk full, invalid format, and more

Supported Platforms

PlatformSupported
Android
iOS

Technical Highlights

  • Android: Uses the MediaStore API with IS_PENDING flag support for Scoped Storage on API 29+. WRITE_EXTERNAL_STORAGE permission is only required on API 28 and below.
  • iOS: Uses PHPhotoLibrary with add-only permission (NSPhotoLibraryAddUsageDescription) by default. Read/write permission is only requested when the albumName parameter is used, preventing TCC crashes.
  • Minimal dependencies: No dependencies beyond plugin_platform_interface, keeping the package lightweight.
  • Platform Channel architecture: Follows the standard Flutter plugin architecture, communicating with native code via Method Channels.

Why It Stands Out

Most gallery-related Flutter packages bundle reading, deleting, and listing capabilities, which means heavier packages and unnecessary permission requests. just_save_gallery follows the single responsibility principle — it only saves. This makes it ideal for camera apps, downloaders, or any app that just needs to save media to the gallery with minimal permissions and dependencies. Typed error handling and automatic permission management also reduce boilerplate code.

Comments