Flutter plugin for selecting multiple images from the Android and iOS image library

Overview

advance_image_picker

Flutter plugin for selecting multiple images from the Android and iOS image library, taking new pictures with the camera, and edit them before using such as rotating, cropping, adding sticker/filters.

This is an advanced version of image_picker plugin.

Key Features

  • Display live camera preview in a widget
  • Adjust exposure
  • Zoom camera preview
  • Capture photo without saving into device library
  • Capture with preview size mode & full screen size mode
  • Select photos from device library by browsing photo albums
  • Preview selected images
  • Support button label & text translation
  • Easy image editing features, such as rotation, cropping, adding sticker/filters
  • Allow user add external image editors for editing selected images.
  • Support for displaying object detection & OCR result on selected image view
  • Allow setting user's own stickers

Apps using this package

1. freemar.vn - Shopping app for Vietnamese

Google Play App Store

2. trainghiem.vn - Find places to have fun, find places to experience!

Google Play App Store

3. Henoo - Heritage in your pocket (Le patrimoine dans la poche)

Google Play App Store

Demo & Screenshots


Youtube Demo Link

Installation

iOS

Add these settings to the ios/Runner/Info.plist


   
    NSCameraUsageDescription
   

   
    Can I use the camera please?
   

   
    NSMicrophoneUsageDescription
   

   
    Can I use the mic please?
   

   
    NSPhotoLibraryUsageDescription
   

   
    App need your agree, can visit your album
   

Android

Change the minimum Android sdk version to 21 (or higher) in your android/app/build.gradle file.

minSdkVersion 21

Add activity and uses-permissions to your AndroidManifest.xml, just like next.

">

   

    
    
        
     
    
    
    
    
    
    
    
    

   

Usages

Add to pubspec

dependencies:
  advance_image_picker: $latest_version

Import dart code

import 'package:advance_image_picker/advance_image_picker.dart';

Setting configs & text translate function

// Setup image picker configs (global settings for app)
var configs = ImagePickerConfigs();
configs.appBarTextColor = Colors.black;
configs.stickerFeatureEnabled = false; // ON/OFF features
configs.translateFunc = (name, value) => Intl.message(value, name: name); // Use intl function

Sample for adding external image editors.
(You can replace ImageEdit widget by your owned image editor widget, that output file after editing finised)

configs.externalImageEditors['external_image_editor_1'] = EditorParams(
      title: 'external_image_editor_1',
      icon: Icons.edit_rounded,
      onEditorEvent: (
              {required BuildContext context,
              required File file,
              required String title,
              int maxWidth = 1080,
              int maxHeight = 1920,
              int compressQuality = 90,
              ImagePickerConfigs? configs}) async => await Navigator.of(context).push(MaterialPageRoute
   
    (
              fullscreenDialog: true,
              builder: (context) => ImageEdit(file: file, title: title, maxWidth: maxWidth, maxHeight: maxHeight, configs: configs)))
  );

   

Sample for usage

// Get max 5 images
List
   
     objects =
    await Navigator.of(context).push(
        PageRouteBuilder(pageBuilder:
            (context, animation, __) {
  return ImagePicker(maxCount: 5);
}));

if (objects.length > 0) {
  setState(() {
    imageFiles.addAll(objects
        .map((e) => e.modifiedPath)
        .toList());
  });
}

   

Credits

This software uses the following open source packages:

  • camera
  • photo_manager
  • photo_view
  • image
  • image_cropper
  • image_editor
  • flutter_native_image
  • path_provider

Support

If this plugin was useful to you, helped you to deliver your app, saved you a lot of time, or you just want to support the project, I would be very grateful if you buy me a cup of coffee.

Buy Me A Coffee

You might also like...

A Flutter project thats shows you how to upload, view and delete images using firebase cloud storage

A Flutter project thats shows you how to upload, view and delete images using firebase cloud storage

firebase_image_upload A Flutter project thats shows you how to upload, view and

Nov 21, 2022

Playify is a Flutter plugin for play/pause/seek songs, fetching music metadata, and browsing music library.

Playify is a Flutter plugin for play/pause/seek songs, fetching music metadata, and browsing music library.

Playify Playify is a Flutter plugin for play/pause/seek songs, fetching music metadata, and browsing music library. Playify was built using iOS's Medi

Dec 14, 2022

Flutter package for creating a fully customizable and editable image widget.

Flutter package for creating a fully customizable and editable image widget.

EditableImage Flutter Package Flutter package for creating a fully customizable and editable image widget. The package has been written solely in Dart

Jun 13, 2022

A small image utils package for flutter written in dart.

flutter_simple_image_utils A small image utils package for flutter written in dart. Usage: import 'package:flutter_simple_image_utils/flutter_simple_i

Nov 18, 2021

A plugins pick Image & camera for Flutter

A plugins pick Image & camera for Flutter

christian_picker_image Flutter plugin that allows you to upload multi image picker on iOS & Android. Getting Started ChristianImagePicker is an all-in

Apr 29, 2022

A Flutter package for both android and iOS which provides Audio recorder

A Flutter package for both android and iOS which provides Audio recorder

social_media_recorder A Flutter package for both android and iOS which provides

Dec 29, 2022

Just_audio: a feature-rich audio player for Android, iOS, macOS and web

Just_audio: a feature-rich audio player for Android, iOS, macOS and web

just_audio just_audio is a feature-rich audio player for Android, iOS, macOS and web. Mixing and matching audio plugins The flutter plugin ecosystem c

Jun 28, 2022

Automatically generates native code for adding splash screens in Android and iOS.

Automatically generates native code for adding splash screens in Android and iOS.

Automatically generates native code for adding splash screens in Android and iOS. Customize with specific platform, background color and splash image.

Jan 2, 2023
Comments
  • Ios Gallery Album Pick RangeError

    Ios Gallery Album Pick RangeError

    I get a "RangeError (index): Invalid value: Valid value range is empty: 0" error when selecting different album. This only happens on IOS, I didn't have a problem on android.

    DIY: Open the gallery to select a picture. Click Recents to look at other albums from the top and I get rangeError error.

    Any error does not appear in the console.

    I think the problem is (await a.getAssetListRange(start: 0, end: 1)) .first .thumbnailDataWithSize)

    This is related to the code block because in android it doesn't come empty while in ios some of them come empty.

    IOS VER: 14.4 FLUTTER VER: 3

    opened by seceba 0
  • Example code not working for camera position

    Example code not working for camera position

    Environment Mac M1, Flutter 3.0 IOS version target 15

    In info.plist NSCameraUsageDescription is included

    When opening dialog for selecting picture from camera, the request permission screen is shown. Clicking on button leads to an error message. No Dialog opens for confirming camera usage.

    Error message The following _CastError was thrown while handling a gesture: Null check operator used on a null value

    When the exception was thrown, this was the stack: #0 _ImagePickerState._initCameraController (package:advance_image_picker/widgets/picker/image_picker.dart:281:41)

    Line 281: final cameraController = _controller!;

    opened by tbecker 0
  • Black background for edited image

    Black background for edited image

    _20211013_000550 _20211013_000609 When I select an image without a background, it appears without a background, but when I edit it, such as cropping or adjusting brightness, it appears with a black background as shown in the image. How can i fix that???

    opened by OmarHalabii 0
  • NEW FEATURE: Platform aware confirmation dialogs

    NEW FEATURE: Platform aware confirmation dialogs

    Currently advance_image_picker always uses Material style confirmation dialogs. This is not ideal for iPhone/iPad users, since iOS users feel more at home when dialogs use native looking confirmation dialog style.

    Add a new feature that by default uses:

    • Cupertino style confirmation dialogs on iOS and macOS.
    • Material style confirmation dialogs on all other platforms.

    A configuration option would be provided that offers:

    • dialogStyle: DialogStyle.platform - Platform adaptive. This would be the new default style! Minor style break with past versions!
    • dialogStyle: DialogStyle.materail - Material style. Currently this is always used and the only choice.
    • dialogStyle: DialogStyle.cupertino - Cupertino/iOS style.

    This issue is summitted so it can be marked in this issue when it is being worked on. I might work on it myself later.

    opened by rydmike 0
Releases(v1.1.5+5)
  • v1.1.5+5(Oct 17, 2021)

    [0.1.5+5]

    • Fixbugs:
      • Check permission for camera & photo gallery
      • Fixbug about OCR text editting

    [0.1.5+1]

    • New features:
      • Add custom stickers (by @matthewmizzi suggestion)

    [0.1.5]

    • New features:
      • Object detection & OCR extraction interface for image

    [0.1.4]d

    • New ImagePickerConfigs features:

      • Camera flash mode flashMode, the starting flash mode for the camera can be set to other values than FlashMode.auto. The default is FlashMode.auto as in previous version where it could not be modified.
      • Option to remove the flash mode toggle button. If you do not want to allow users to change the flash mode, you can set showFlashMode to false. It defaults to true. If showFlashMode is false, the flash mode will use what is set by flashMode, since user cannot toggle it.
      • Config option to show and hide the lens direction icon button. If you want to show only one camera, you may also want to hide the button than enables users switch camera. You can then set showLensDirection to false. If you show just one cameraLensDirection and showLensDirection is true, then the lens direction button is still shown, but disabled as in previous versions.
      • Only add the text line for textSelectedImagesGuide if it is not empty. If no drag reorder guidance label is specified in translation by returning empty string '' for textSelectedImagesGuide, then the extra line that holds the text will also be removed, resulting in more camera view space.
      • For label textSelectedImagesTitle only show it, the colon and space after it, if it is not empty. If you return a translated string that is empty '', you can get only the selected "image / max" count shown, with no label and colon.
      • Use an IconButton as done button, instead of the default OutlinedButton. Set doneButtonStyle to [DoneButtonStyle.iconButton] for this option. Defaults to DoneButtonStyle.outlinedButton, that is the same as only option in previous versions. You can also change the button icon by defining custom IconData for the doneButtonIcon.
      • Hide done action button when no images have been selected. This is optional new behavior that can be used instead of default, that disables it. Select the style with doneButtonDisabledBehavior.
      • Optional alert when removing selected images. If you set showRemoveImageAlert to false, there is no alert dialog to confirm the remove/delete of an image, when user clicks on the delete icon to remove photos and images from the list of images to be used, they are just removed immediately. Defaults to true, showing the alert dialog, which is same behavior as in previous version.
    • Update all dependencies to their latest versions, most notably image_editor to version 1.0.1 that now uses Android embedding V2.

    • Clean up remaining lint warnings.

    Source code(tar.gz)
    Source code(zip)
  • v0.1.2(Sep 5, 2021)

  • v.0.1.1(Sep 3, 2021)

  • v0.1.0(Aug 27, 2021)

    • Rewrite image sticker feature
    • Update camera plugin to v0.9.1
    • Improve UI customization

    https://pub.dev/packages/advance_image_picker/changelog

    Source code(tar.gz)
    Source code(zip)
Owner
Weta Vietnam
WetaVN Build smart apps for everyone!
Weta Vietnam
Image Editor Plugin with simple, easy support for image editing using Paints, Text, Filters, Emoji and Sticker like stories.

ImageEditorPro Image Editor Plugin with simple, easy support for image editing using Paints, Text, Filters, Emoji and Sticker like stories. To start w

Zeeshan 206 Dec 2, 2022
This app classifies images based on any TFLite image classification model

This app classifies images based on any TFLite image classification model. A sample model has been provided to classify cats vs. dogs.

Daniel Alexander 0 Feb 20, 2022
Image Picker Load image from camera and gallery

image_choose A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if

MD TAMIM ISLAM KHAN 2 Sep 12, 2022
BC Image Editor - Flutter package for image editing

BC Image Editor You can edit image using this package and also you can create flex preview image by setting foreground to null. For now, you can use o

Berkay CEYLAN 9 Nov 21, 2022
A flutter package for iOS and Android for applying filter to an image

Photo Filters package for flutter A flutter package for iOS and Android for applying filter to an image. A set of preset filters are also available. Y

Ansh rathod 1 Oct 26, 2021
A Flutter audio plugin (Swift/Java) to play remote or local audio files on iOS / Android / MacOS and Web

AudioPlayer A Flutter audio plugin (Swift/Java) to play remote or local audio files on iOS / Android / MacOS and Web. Online demo Features Android / i

Erick Ghaumez 489 Dec 18, 2022
A Flutter media player plugin for iOS and android based on ijkplayer

Flutter media player plugin for android/iOS based on ijkplayer.

于飞白呀 1.4k Jan 4, 2023
A flutter plugin to handle Android / iOS camera

?? Overview Flutter plugin to add Camera support inside your project. CamerAwesome include a lot of useful features like: ?? Live camera flip ( switch

Apparence.io 511 Jan 5, 2023
A Flutter plugin to use speech recognition on iOS & Android (Swift/Java)

speech_recognition A flutter plugin to use the speech recognition iOS10+ / Android 4.1+ Basic Example Sytody, speech to todo app Installation Depend o

Erick Ghaumez 331 Dec 19, 2022
Better video player for Flutter, with multiple configuration options. Solving typical use cases!

Better video player for Flutter, with multiple configuration options. Solving typical use cases!

Jakub 732 Jan 2, 2023