in_app_gallery 1.0.0 copy "in_app_gallery: ^1.0.0" to clipboard
in_app_gallery: ^1.0.0 copied to clipboard

A highly customizable Flutter plugin for selecting images and videos from the device gallery, featuring a polished UI and media compression.

In App Gallery #

A highly customizable, beautiful Flutter plugin for selecting images and videos from the device gallery. It provides a polished UI, media compression, and robust media handling using flutter blocks and photo_manager.

Features #

  • Media Fetching: Fetch and display images and videos from the local gallery.
  • Custom UI: A highly customizable and sleek user interface for media selection.
  • Compression: Built-in image and video compression features.
  • Permissions: Handles required permissions out of the box.

Showcase #

Here are some screenshots of the in_app_gallery plugin in action:

Showcase 1 Showcase 2 Showcase 3 Showcase 4

(Note to developer: Create a screenshots folder in your repository, place the 4 images you provided as 1.png, 2.png, 3.png, and 4.png, and update the image URLs to point to your actual repository).

Dependencies & Architecture #

This plugin is built using several robust packages to provide a seamless experience:

Video Compression #

Video compression is handled natively to ensure maximum performance and avoid out-of-memory errors:

  • Android: Uses Transcoder (com.otaliastudios:transcoder) for lightning-fast hardware-accelerated video compression directly via Kotlin.
  • iOS: Leverages native AVFoundation (AVAssetExportSession) to perform highly optimized, asynchronous video compression.

Getting Started #

Add in_app_gallery as a dependency in your pubspec.yaml file:

dependencies:
  in_app_gallery: ^0.0.1

Platform Requirements #

Android #

Add the following permissions to your AndroidManifest.xml (located in android/app/src/main/AndroidManifest.xml):

<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<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_VISUAL_USER_SELECTED"/>

iOS #

Add the following keys to your Info.plist (located in ios/Runner/Info.plist):

<key>NSPhotoLibraryUsageDescription</key>
<string>This app requires access to the photo library to pick images and videos.</string>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>This app requires access to save photos to the library.</string>

Usage #

import 'package:in_app_gallery/in_app_gallery.dart';

// Inside your stateful widget:
List<File> _selectedMedia = [];

Future<void> _openGallery() async {
  final result = await Navigator.of(context).push(
    MaterialPageRoute(
      builder: (context) => const InAppGalleryScreen(
        title: 'Select Media',
        maxSelection: 10,
        allowVideoCompression: true,
      ),
    ),
  );

  if (result != null && result is List<File>) {
    setState(() {
      _selectedMedia = result;
    });
  }
}
1
likes
0
points
201
downloads

Publisher

unverified uploader

Weekly Downloads

A highly customizable Flutter plugin for selecting images and videos from the device gallery, featuring a polished UI and media compression.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

device_info_plus, flutter, flutter_bloc, flutter_image_compress, fluttertoast, image_picker, media_kit, media_kit_libs_video, media_kit_video, path_provider, permission_handler, photo_manager, plugin_platform_interface, skeletonizer, uuid

More

Packages that depend on in_app_gallery

Packages that implement in_app_gallery