Viewing version 1.2.0. Open the latest package page.

image_picker

1.2.0

Flutter plugin for selecting images from the Android and iOS image library, and taking new pictures with the camera.

Download archive

Readme

Image Picker plugin for Flutter

pub package

A Flutter plugin for iOS and Android for picking images from the image library, and taking new pictures with the camera.

Android iOS Linux macOS Web Windows
Support SDK 21+ iOS 12+ Any 10.14+ See image_picker_for_web Windows 10+

Setup

iOS

Starting with version 0.8.1 the iOS implementation uses PHPicker to pick (multiple) images on iOS 14 or higher. As a result of implementing PHPicker it becomes impossible to pick HEIC images on the iOS simulator in iOS 14+. This is a known issue. Please test this on a real device, or test with non-HEIC images until Apple solves this issue. 63426347 - Apple known issue

Add the following keys to your Info.plist file, located in <project root>/ios/Runner/Info.plist:

  • NSPhotoLibraryUsageDescription - describe why your app needs permission for the photo library. This is called Privacy - Photo Library Usage Description in the visual editor.
    • This permission will not be requested if you always pass false for requestFullMetadata, but App Store policy requires including the plist entry.
  • NSCameraUsageDescription - describe why your app needs access to the camera. This is called Privacy - Camera Usage Description in the visual editor.
  • NSMicrophoneUsageDescription - describe why your app needs access to the microphone, if you intend to record videos. This is called Privacy - Microphone Usage Description in the visual editor.

Android

Starting with version 0.8.1 the Android implementation support to pick (multiple) images on Android 4.3 or higher.

No configuration required - the plugin should work out of the box. It is however highly recommended to prepare for Android killing the application when low on memory. How to prepare for this is discussed in the Handling MainActivity destruction on Android section.

It is no longer required to add android:requestLegacyExternalStorage="true" as an attribute to the <application> tag in AndroidManifest.xml, as image_picker has been updated to make use of scoped storage.

Handling MainActivity destruction

When under high memory pressure the Android system may kill the MainActivity of the application using the image_picker. On Android the image_picker makes use of the default Intent.ACTION_GET_CONTENT or MediaStore.ACTION_IMAGE_CAPTURE intents. This means that while the intent is executing the source application is moved to the background and becomes eligible for cleanup when the system is low on memory. When the intent finishes executing, Android will restart the application. Since the data is never returned to the original call use the ImagePicker.retrieveLostData() method to retrieve the lost data. For example:

Future<void> getLostData() async {
  final ImagePicker picker = ImagePicker();
  final LostDataResponse response = await picker.retrieveLostData();
  if (response.isEmpty) {
    return;
  }
  final List<XFile>? files = response.files;
  if (files != null) {
    _handleLostFiles(files);
  } else {
    _handleError(response.exception);
  }
}

This check should always be run at startup in order to detect and handle this case. Please refer to the example app for a more complete example of handling this flow.

Permanently storing images and videos

Images and videos picked using the camera are saved to your application's local cache, and should therefore be expected to only be around temporarily. If you require your picked image to be stored permanently, it is your responsibility to move it to a more permanent location.

Android Photo Picker

On Android 13 and above this package uses the Android Photo Picker . On Android 12 and below use of Android Photo Picker is optional. Learn how to use it.

Using launchMode: singleInstance

Launching the image picker from an Activity with launchMode: singleInstance will always return RESULT_CANCELED. In this launch mode, new activities are created in a separate Task. As activities cannot communicate between tasks, the image picker activity cannot send back its eventual result to the calling activity. To work around this problem, consider using launchMode: singleTask instead.

Windows, macOS, and Linux

This plugin currently has limited support for the three desktop platforms, serving as a wrapper around the file_selector plugin with appropriate file type filters set. Selection modification options, such as max width and height, are not yet supported.

By default, ImageSource.camera is not supported, since unlike on Android and iOS there is no system-provided UI for taking photos. However, the desktop implementations allow delegating to a camera handler by setting a cameraDelegate before using image_picker, such as in main():

import 'package:image_picker_platform_interface/image_picker_platform_interface.dart';
// ···
class MyCameraDelegate extends ImagePickerCameraDelegate {
  @override
  Future<XFile?> takePhoto(
      {ImagePickerCameraDelegateOptions options =
          const ImagePickerCameraDelegateOptions()}) async {
    return _takeAPhoto(options.preferredCameraDevice);
  }

  @override
  Future<XFile?> takeVideo(
      {ImagePickerCameraDelegateOptions options =
          const ImagePickerCameraDelegateOptions()}) async {
    return _takeAVideo(options.preferredCameraDevice);
  }
}
// ···
void setUpCameraDelegate() {
  final ImagePickerPlatform instance = ImagePickerPlatform.instance;
  if (instance is CameraDelegatingImagePickerPlatform) {
    instance.cameraDelegate = MyCameraDelegate();
  }
}

Once you have set a cameraDelegate, image_picker calls with ImageSource.camera will work as normal, calling your provided delegate. We encourage the community to build packages that implement ImagePickerCameraDelegate, to provide options for desktop camera UI.

macOS installation

Since the macOS implementation uses file_selector, you will need to add a filesystem access entitlement:

  <key>com.apple.security.files.user-selected.read-only</key>
  <true/>

Example

final ImagePicker picker = ImagePicker();
// Pick an image.
final XFile? image = await picker.pickImage(source: ImageSource.gallery);
// Capture a photo.
final XFile? photo = await picker.pickImage(source: ImageSource.camera);
// Pick a video.
final XFile? galleryVideo =
    await picker.pickVideo(source: ImageSource.gallery);
// Capture a video.
final XFile? cameraVideo = await picker.pickVideo(source: ImageSource.camera);
// Pick multiple images.
final List<XFile> images = await picker.pickMultiImage();
// Pick singe image or video.
final XFile? media = await picker.pickMedia();
// Pick multiple images and videos.
final List<XFile> medias = await picker.pickMultipleMedia();

Migrating to 1.0

Starting with version 0.8.2 of the image_picker plugin, new methods were added that return XFile instances (from the cross_file package) rather than the plugin's own PickedFile instances. The previous methods were supported through 0.8.9, and removed in 1.0.0.

Call the new methods

Old API New API
PickedFile image = await _picker.getImage(...) XFile image = await _picker.pickImage(...)
List<PickedFile> images = await _picker.getMultiImage(...) List<XFile> images = await _picker.pickMultiImage(...)
PickedFile video = await _picker.getVideo(...) XFile video = await _picker.pickVideo(...)
LostData response = await _picker.getLostData() LostDataResponse response = await _picker.retrieveLostData()
Changelog

1.2.0

  • Adds pickMultiVideo to allow selecting multiple videos from the gallery.
  • Updates minimum supported SDK version to Flutter 3.27/Dart 3.6.

1.1.2

  • Adds comment for the limit parameter.

1.1.1

  • Updates documentation to note that Android Photo Picker use is not optional on Android 13+.

1.1.0

  • Adds limit parameter to MediaOptions and MultiImagePickerOptions which limits the number of media that can be selected.
    • Currently supported only on iOS and Android.
  • Updates minimum supported SDK version to Flutter 3.19/Dart 3.3.

1.0.8

  • Updates minimum supported SDK version to Flutter 3.13/Dart 3.1.
  • Updates support matrix in README to indicate that iOS 11 is no longer supported.
  • Clients on versions of Flutter that still support iOS 11 can continue to use this package with iOS 11, but will not receive any further updates to the iOS implementation.
  • Updates minimum iOS implementation version to include a privacy manifest.

1.0.7

  • Updates minimum required plugin_platform_interface version to 2.1.7.

1.0.6

  • Fixes new lint warnings.

1.0.5

  • Updates example app to use non-deprecated video_player method.
  • Updates minimum supported SDK version to Flutter 3.10/Dart 3.0.

1.0.4

  • Updates README to fix broken link.

1.0.3

  • Adds pub topics to package metadata.
  • Updates minimum supported SDK version to Flutter 3.7/Dart 2.19.

1.0.2

  • Adds compatibility with image_picker_for_web 3.0.

1.0.1

  • Rolls platform implementations to ensure that pickMedia and pickMultipleMedia have platform implementations.

1.0.0

  • BREAKING CHANGE: Removes the deprecated get* methods. Clients who have not already done so will need to migrate to the pick* versions that use XFile rather than PickedFile for return values.
    • As this is the only change, we encourage authors of published packages that depend on image_picker to consider using a constraint of '>=0.8.9 <2.0.0' rather than ^1.0.0 when updating dependencies, to avoid conflicts with packages that have not yet updated.

0.8.9

  • Adds pickMedia and pickMultipleMedia methods.

0.8.8

  • Adds initial support for Windows, macOS, and Linux.
    • See README for current desktop limitations.
  • Adds supportsImageSource to allow runtime checks for whether a given source is supported by the current platform's implementation.

0.8.7+5

  • Fixes BuildContext handling in example.

0.8.7+4

  • Updates README to mention usage of launchMode: singleInstance for Android.

0.8.7+3

  • Adds handling of unsupported image types to the example.

0.8.7+2

  • Updates minimum Flutter version to 3.3.
  • Fixes a broken link in the example related to image_picker_for_web.

0.8.7+1

  • Updates README to use code excerpts.

0.8.7

  • Adds usePhotoPickerAndroid options.
  • Aligns Dart and Flutter SDK constraints.

0.8.6+4

  • Updates iOS minimum version in README.

0.8.6+3

  • Updates links for the merge of flutter/plugins into flutter/packages.

0.8.6+2

  • Updates NSPhotoLibraryUsageDescription description in README.

  • Updates minimum Flutter version to 3.0.

0.8.6+1

  • Updates code for stricter lint checks.

0.8.6

  • Updates minimum Flutter version to 2.10.
  • Fixes avoid_redundant_argument_values lint warnings and minor typos.
  • Adds requestFullMetadata option to pickImage, so images on iOS can be picked without Photo Library Usage permission.

0.8.5+3

  • Adds argument error assertions to the app-facing package, to ensure consistency across platform implementations.
  • Updates tests to use a mock platform instead of relying on default method channel implementation internals.

0.8.5+2

  • Minor fixes for new analysis options.

0.8.5+1

  • Fixes library_private_types_in_public_api, sort_child_properties_last and use_key_in_widget_constructors lint warnings.

0.8.5

  • Moves Android and iOS implementations to federated packages.
  • Adds OS version support information to README.

0.8.4+11

  • Fixes Activity leak.

0.8.4+10

  • iOS: allows picking images with WebP format.

0.8.4+9

  • Internal code cleanup for stricter analysis options.

0.8.4+8

  • Configures the UIImagePicker to default to gallery instead of camera when picking multiple images on pre-iOS 14 devices.

0.8.4+7

  • Refactors unit test to expose private interface via a separate test header instead of the inline declaration.

0.8.4+6

  • Fixes minor type issues in iOS implementation.

0.8.4+5

  • Improves the documentation on handling MainActivity being killed by the Android OS.
  • Updates Android compileSdkVersion to 31.
  • Fix iOS RunnerUITests search paths.

0.8.4+4

  • Fix typos in README.md.

0.8.4+3

  • Suppress a unchecked cast build warning.

0.8.4+2

  • Update minimum Flutter SDK to 2.5 and iOS deployment target to 9.0.

0.8.4+1

  • Fix README Example for ImagePickerCache to cache multiple files.

0.8.4

  • Update ImagePickerCache to cache multiple files.

0.8.3+3

  • Fix pickImage not returning a value on iOS when dismissing PHPicker sheet by swiping.
  • Updated Android lint settings.

0.8.3+2

  • Fix using Camera as image source on Android 11+

0.8.3+1

  • Fixed README Example.

0.8.3

  • Move ImagePickerFromLimitedGalleryUITests to RunnerUITests target.
  • Improved handling of bad image data when applying metadata changes on iOS.

0.8.2

  • Added new methods that return package:cross_file XFile instances. Docs.
  • Deprecate methods that return PickedFile instances:
    • getImage: use pickImage instead.
    • getVideo: use pickVideo instead.
    • getMultiImage: use pickMultiImage instead.
    • getLostData: use retrieveLostData instead.

0.8.1+4

  • Fixes an issue where preferredCameraDevice option is not working for getVideo method.
  • Refactor unit tests that were device-only before.

0.8.1+3

  • Fix image picker causing a crash when the cache directory is deleted.

0.8.1+2

  • Update the example app to support the multi-image feature.

0.8.1+1

  • Expose errors thrown in pickImage and pickVideo docs.

0.8.1

  • Add a new method getMultiImage to allow picking multiple images on iOS 14 or higher and Android 4.3 or higher. Returns only 1 image for lower versions of iOS and Android.
  • Known issue: On Android, getLostData will only get the last picked image when picking multiple images, see: #84634.

0.8.0+4

  • Cleaned up the README example

0.8.0+3

  • Readded request for camera permissions.

0.8.0+2

  • Fix a rotation problem where when camera is chosen as a source and additional parameters are added.

0.8.0+1

  • Removed redundant request for camera permissions.

0.8.0

  • BREAKING CHANGE: Changed storage location for captured images and videos to internal cache on Android, to comply with new Google Play storage requirements. This means developers are responsible for moving the image or video to a different location in case more permanent storage is required. Other applications will no longer be able to access images or videos captured unless they are moved to a publicly accessible location.
  • Updated Mockito to fix Android tests.

0.7.5+4

  • Migrate maven repo from jcenter to mavenCentral.

0.7.5+3

  • Localize UIAlertController strings.

0.7.5+2

  • Implement UIAlertController with a preferredStyle of UIAlertControllerStyleAlert since UIAlertView is deprecated.

0.7.5+1

  • Fixes a rotation problem where Select Photos limited access is chosen but the image that is picked is not included selected photos and image is scaled.

0.7.5

  • Fixes an issue where image rotation is wrong when Select Photos chose and image is scaled.
  • Migrate to PHPicker for iOS 14 and higher versions to pick image from the photo library.
  • Implement the limited permission to pick photo from the photo library when Select Photo is chosen.

0.7.4

  • Update flutter_plugin_android_lifecycle dependency to 2.0.1 to fix an R8 issue on some versions.

0.7.3

  • Endorse image_picker_for_web.

0.7.2+1

  • Android: fixes an issue where videos could be wrongly picked with .jpg extension.

0.7.2

  • Run CocoaPods iOS tests in RunnerUITests target.

0.7.1

  • Update platform_plugin_interface version requirement.

0.7.0

  • Migrate to nullsafety
  • Breaking Changes:
    • Removed the deprecated methods: ImagePicker.pickImage, ImagePicker.pickVideo, ImagePicker.retrieveLostData

0.6.7+22

  • iOS: update XCUITests to separate each test session.

0.6.7+21

  • Update the example app: remove the deprecated RaisedButton and FlatButton widgets.

0.6.7+20

  • Updated README.md to show the new Android API requirements.

0.6.7+19

  • Do not copy static field to another static field.

0.6.7+18

  • Fix outdated links across a number of markdown files (#3276)

0.6.7+17

  • iOS: fix User-facing text should use localized string macro warning.

0.6.7+16

  • Update Flutter SDK constraint.

0.6.7+15

0.6.7+14

  • Set up XCUITests.

0.6.7+13

  • Update documentation of getImage() about HEIC images.

0.6.7+12

  • Update android compileSdkVersion to 29.

0.6.7+11

  • Keep handling deprecated Android v1 classes for backward compatibility.

0.6.7+10

  • Updated documentation with code that does not throw an error when image is not picked.

0.6.7+9

  • Updated the ExifInterface to the AndroidX version to support more file formats;
  • Update documentation of getImage() regarding compression support for specific image types.

0.6.7+8

  • Update documentation of getImage() about Android's disability to preference front/rear camera.

0.6.7+7

  • Updating documentation to use isEmpty check.

0.6.7+6

  • Update package:e2e -> package:integration_test

0.6.7+5

  • Update package:e2e reference to use the local version in the flutter/plugins repository.

0.6.7+4

  • Support iOS simulator x86_64 architecture.

0.6.7+3

  • Fixes to the example app:
    • Make videos in web start muted. This allows auto-play across browsers.
    • Prevent the app from disposing of video controllers too early.

0.6.7+2

  • iOS: Fixes unpresentable album/image picker if window's root view controller is already presenting other view controller.

0.6.7+1

  • Add web support to the example app.

0.6.7

  • Utilize the new platform_interface package.
  • This change marks old methods as deprecated. Please check the README for migration instructions to the new API.

0.6.6+5

  • Pin the version of the platform interface to 1.0.0 until the plugin refactor is ready to go.

0.6.6+4

  • Fix bug, sometimes double click cancel button will crash.

0.6.6+3

  • Update README

0.6.6+2

  • Update lower bound of dart dependency to 2.1.0.

0.6.6+1

  • Android: always use URI to get image/video data.

0.6.6

  • Use the new platform_interface package.

0.6.5+3

  • Move core plugin to a subdirectory to allow for federation.

0.6.5+2

  • iOS: Fixes crash when an image in the gallery is tapped more than once.

0.6.5+1

  • Fix CocoaPods podspec lint warnings.

0.6.5

  • Set maximum duration for video recording.
  • Fix some existing XCTests.

0.6.4

  • Add a new parameter to select preferred camera device.

0.6.3+4

  • Make the pedantic dev_dependency explicit.

0.6.3+3

  • Android: Fix a crash when externalFilesDirectory does not exist.

0.6.3+2

  • Bump RoboElectric dependency to 4.3.1 and update resource usage.

0.6.3+1

  • Fix an issue that the example app won't launch the image picker after Android V2 embedding migration.

0.6.3

  • Support Android V2 embedding.
  • Migrate to using the new e2e test binding.

0.6.2+3

  • Remove the deprecated author: field from pubspec.yaml
  • Migrate the plugin to the pubspec platforms manifest.
  • Require Flutter SDK 1.10.0 or greater.

0.6.2+2

  • Android: Revert the image file return logic when the image doesn't have to be scaled. Fix a rotation regression caused by 0.6.2+1
  • Example App: Add a dialog to enter maxWidth, maxHeight or quality when picking image.

0.6.2+1

  • Android: Fix a crash when a non-image file is picked.
  • Android: Fix unwanted bitmap scaling.

0.6.2

  • iOS: Fixes an issue where picking content from Gallery would result in a crash on iOS 13.

0.6.1+11

  • Stability and Maintainability: update documentations, add unit tests.

0.6.1+10

  • iOS: Fix image orientation problems when scaling images.

0.6.1+9

  • Remove AndroidX warning.

0.6.1+8

  • Fix iOS build and analyzer warnings.

0.6.1+7

  • Android: Fix ImagePickerPlugin#onCreate casting context which causes exception.

0.6.1+6

  • Define clang module for iOS

0.6.1+5

  • Update and migrate iOS example project.

0.6.1+4

  • Android: Fix a regression where the retrieveLostImage does not work anymore.
  • Set up Android unit test to test ImagePickerCache and added image quality caching tests.

0.6.1+3

  • Bugfix iOS: Fix orientation of the picked image after scaling.
  • Remove unnecessary code that tried to normalize the orientation.
  • Trivial XCTest code fix.

0.6.1+2

  • Replace dependency on androidx.legacy:legacy-support-v4:1.0.0 with androidx.core:core:1.0.2

0.6.1+1

  • Add dependency on androidx.annotation:annotation:1.0.0.

0.6.1

  • New feature : Get images with custom quality. While picking images, user can pass imageQuality parameter to compress image.

0.6.0+20

  • Android: Migrated information cache methods to use instance methods.

0.6.0+19

  • Android: Fix memory leak due not unregistering ActivityLifecycleCallbacks.

0.6.0+18

  • Fix video play in example and update video_player plugin dependency.

0.6.0+17

  • iOS: Fix a crash when user captures image from the camera with devices under iOS 11.

0.6.0+16

  • iOS Simulator: fix hang after trying to take an image from the non-existent camera.

0.6.0+15

  • Android: throws an exception when permissions denied instead of ignoring.

0.6.0+14

  • Fix typo in README.

0.6.0+13

  • Bugfix Android: Fix a crash occurs in some scenarios when user picks up image from gallery.

0.6.0+12

  • Use class instead of struct for GIFInfo in iOS implementation.

0.6.0+11

  • Don't use module imports.

0.6.0+10

  • iOS: support picking GIF from gallery.

0.6.0+9

  • Add missing template type parameter to invokeMethod calls.
  • Bump minimum Flutter version to 1.5.0.
  • Replace invokeMethod with invokeMapMethod wherever necessary.

0.6.0+8

  • Bugfix: Add missed return statement into the image_picker example.

0.6.0+7

  • iOS: Rename objects to follow Objective-C naming convention to avoid conflicts with other iOS library/frameworks.

0.6.0+6

  • iOS: Picked image now has all the correct meta data from the original image, includes GPS, orientation and etc.

0.6.0+5

  • iOS: Add missing import.

0.6.0+4

  • iOS: Using first byte to determine original image type.
  • iOS: Added XCTest target.
  • iOS: The picked image now has the correct EXIF data copied from the original image.

0.6.0+3

  • Android: fixed assertion failures due to reply messages that were sent on the wrong thread.

0.6.0+2

  • Android: images are saved with their real extension instead of always using .jpg.

0.6.0+1

  • Android: Using correct suffix syntax when picking image from remote url.

0.6.0

  • Breaking change iOS: Returned File objects when picking videos now always holds the correct path. Before this change, the path returned could have file:// prepended to it.

0.5.4+3

  • Fix the example app failing to load picked video.

0.5.4+2

  • Request Camera permission if it present in Manifest on Android >= M.

0.5.4+1

  • Bugfix iOS: Cancel button not visible in gallery, if camera was accessed first.

0.5.4

  • Add retrieveLostData to retrieve lost data after MainActivity is killed.

0.5.3+2

  • Android: fix a crash when the MainActivity is destroyed after selecting the image/video.

0.5.3+1

  • Update minimum deploy iOS version to 8.0.

0.5.3

  • Fixed incorrect path being returned from Google Photos on Android.

0.5.2

  • Check iOS camera authorizationStatus and return an error, if the access was denied.

0.5.1

  • Android: Do not delete original image after scaling if the image is from gallery.

0.5.0+9

  • Remove unnecessary temp video file path.

0.5.0+8

  • Fixed wrong GooglePhotos authority of image Uri.

0.5.0+7

  • Fix a crash when selecting images from yandex.disk and dropbox.

0.5.0+6

  • Delete the original image if it was scaled.

0.5.0+5

  • Remove unnecessary camera permission.

0.5.0+4

  • Preserve transparency when saving images.

0.5.0+3

  • Fixed an Android crash when Image Picker is registered without an activity.

0.5.0+2

  • Log a more detailed warning at build time about the previous AndroidX migration.

0.5.0+1

  • Fix a crash when user calls the plugin in quick succession on Android.

0.5.0

  • Breaking change. Migrate from the deprecated original Android Support Library to AndroidX. This shouldn't result in any functional changes, but it requires any Android apps using this plugin to also migrate if they're using the original support library.

0.4.12+1

  • Fix a crash when selecting downloaded images from image picker on certain devices.

0.4.12

  • Fix a crash when user tap the image mutiple times.

0.4.11

  • Use api to define support-v4 dependency to allow automatic version resolution.

0.4.10

  • Depend on full support-v4 library for ease of use (fixes conflicts with Firebase and libraries)

0.4.9

  • Bugfix: on iOS prevent to appear one pixel white line on resized image.

0.4.8

  • Replace the full com.android.support:appcompat-v7 dependency with com.android.support:support-core-utils, which results in smaller APK sizes.
  • Upgrade support library to 27.1.1

0.4.7

  • Added missing video_player package dev dependency.

0.4.6

  • Added support for picking remote images.

0.4.5

  • Bugfixes, code cleanup, more test coverage.

0.4.4

  • Updated Gradle tooling to match Android Studio 3.1.2.

0.4.3

  • Bugfix: on iOS the pickVideo method will now return null when the user cancels picking a video.

0.4.2

  • Added support for picking videos.
  • Updated example app to show video preview.

0.4.1

  • Bugfix: the pickImage method will now return null when the user cancels picking the image, instead of hanging indefinitely.
  • Removed the third party library dependency for taking pictures with the camera.

0.4.0

  • Breaking change. The source parameter for the pickImage is now required. Also, the ImageSource.any option doesn't exist anymore.
  • Use the native Android image gallery for picking images instead of a custom UI.

0.3.1

  • Bugfix: Android version correctly asks for runtime camera permission when using ImageSource.camera.

0.3.0

  • Breaking change. Set SDK constraints to match the Flutter beta release.

0.2.1

  • Simplified and upgraded Android project template to Android SDK 27.
  • Updated package description.

0.2.0

  • Breaking change. Upgraded to Gradle 4.1 and Android Studio Gradle plugin 3.0.1. Older Flutter projects need to upgrade their Gradle setup as well in order to use this version of the plugin. Instructions can be found here.

0.1.5

  • Added FLT prefix to iOS types

0.1.4

  • Bugfix: canceling image picking threw exception.
  • Bugfix: errors in plugin state management.

0.1.3

  • Added optional source argument to pickImage for controlling where the image comes from.

0.1.2

  • Added optional maxWidth and maxHeight arguments to pickImage.

0.1.1

  • Updated Gradle repositories declaration to avoid the need for manual configuration in the consuming app.

0.1.0+1

  • Updated readme and description in pubspec.yaml

0.1.0

  • Updated dependencies
  • Breaking Change: You need to add a maven section with the "https://maven.google.com" endpoint to the repository section of your android/build.gradle. For example:
allprojects {
    repositories {
        jcenter()
        maven {                              // NEW
            url "https://maven.google.com"   // NEW
        }                                    // NEW
    }
}

0.0.3

  • Fix for crash on iPad when showing the Camera/Gallery selection dialog

0.0.2+2

  • Updated README

0.0.2+1

  • Updated README

0.0.2

  • Fix crash when trying to access camera on a device without camera (e.g. the Simulator)

0.0.1

  • Initial Release

Installing

export PUB_HOSTED_URL=https://pub.mirror.p-hatan.com
flutter pub add 'image_picker:1.2.0'
pubspec.yaml
name: image_picker
description: Flutter plugin for selecting images from the Android and iOS image
  library, and taking new pictures with the camera.
repository: https://github.com/flutter/packages/tree/main/packages/image_picker/image_picker
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+image_picker%22
version: 1.2.0

environment:
  sdk: ^3.6.0
  flutter: ">=3.27.0"

flutter:
  plugin:
    platforms:
      android:
        default_package: image_picker_android
      ios:
        default_package: image_picker_ios
      linux:
        default_package: image_picker_linux
      macos:
        default_package: image_picker_macos
      web:
        default_package: image_picker_for_web
      windows:
        default_package: image_picker_windows

dependencies:
  flutter:
    sdk: flutter
  image_picker_android: ^0.8.13
  image_picker_for_web: ^3.1.0
  image_picker_ios: ^0.8.13
  image_picker_linux: ^0.2.2
  image_picker_macos: ^0.2.2
  image_picker_platform_interface: ^2.11.0
  image_picker_windows: ^0.2.2

dev_dependencies:
  build_runner: ^2.1.10
  cross_file: ^0.3.1+1 # Mockito generates a direct include.
  flutter_test:
    sdk: flutter
  mockito: ^5.4.4
  plugin_platform_interface: ^2.1.7

topics:
  - camera
  - image-picker
  - files
  - file-selection

Version history

VersionPublishedArchiveSHA-256
0.0.1On demandDownload12ae6177…defcdc
0.0.2On demandDownload2736f67c…7c4a1f
0.0.2+1On demandDownload04f96556…cb4bb5
0.0.2+2On demandDownloadbb4235ad…58ad68
0.0.3On demandDownload09d92503…28490b
0.1.0On demandDownloaded330aee…2becdb
0.1.0+1On demandDownload74be74a3…929bd6
0.1.1On demandDownload44c29ce4…c6aab6
0.1.2On demandDownloadeec34cd7…13d087
0.1.3On demandDownloadf7cdcb7b…dd982a
0.1.4On demandDownloadc70c7782…dd084d
0.1.5On demandDownloadaafd90ac…997026
0.2.0On demandDownload50060558…bb2b8b
0.2.1On demandDownloade9dd134b…0532f7
0.3.0On demandDownload61805889…e57c25
0.3.1On demandDownload24db4246…a1edad
0.4.0On demandDownload3e95d1bf…39fc26
0.4.1On demandDownloadd7501dfb…97ade8
0.4.2On demandDownloaddde87078…9f49fc
0.4.3On demandDownload16210047…a8dc30
0.4.4On demandDownload0ee1cbe0…8c85ab
0.4.5On demandDownload93577974…1988e9
0.4.6On demandDownloadcff9b48b…c56c03
0.4.7On demandDownloadc8012f68…653e9f
0.4.8On demandDownloadf4edbcc0…ab2239
0.4.10On demandDownload2131149e…08f878
0.4.12On demandDownloade1f99625…ac712f
0.4.12+1On demandDownloada5fcb521…6b62c8
0.5.0On demandDownload945503a1…8de45b
0.5.0+1On demandDownload5add6cb3…43a296
0.5.0+2On demandDownload68fe9fe7…409859
0.5.0+3On demandDownload94df8286…ea6182
0.5.0+6On demandDownload886d4735…6fdbaa
0.5.0+8On demandDownload79c44042…1fa3a2
0.5.0+9On demandDownload197be5f9…0f35b1
0.5.1On demandDownload3e2a156c…72066a
0.5.2On demandDownloadbdc9eed3…3cb28e
0.5.3On demandDownload07d0c86e…67a970
0.5.3+1On demandDownload6ff753d5…48a5c7
0.5.3+2On demandDownloadb480d198…267ff3
0.5.4On demandDownload55b7cd5d…38adbe
0.5.4+1On demandDownload6b6878e3…bc7687
0.5.4+2On demandDownload7b1e8a01…8ac728
0.5.4+3On demandDownloada6328394…8eb5e2
0.6.0On demandDownloadef580c34…7241c3
0.6.0+1On demandDownload853da56d…816cc9
0.6.0+2On demandDownload5c833c26…37b4f0
0.6.0+3On demandDownload75dd2fc1…852542
0.6.0+4On demandDownload2f55c8f6…90d670
0.6.0+5On demandDownloade294468b…5079a0
0.6.0+6On demandDownloadcae170a1…a5fd7e
0.6.0+7On demandDownloaddb1d984b…8f3d91
0.6.0+8On demandDownload49acd5b4…fbc1e1
0.6.0+9On demandDownload56ce3746…7fb1b0
0.6.0+10On demandDownload540668bb…fd533d
0.6.0+11On demandDownload9bcae006…6fd168
0.6.0+12On demandDownload5a1b2bab…a987c9
0.6.0+13On demandDownloadd7c93174…d0cb26
0.6.0+14On demandDownload5c57ef4c…5bb822
0.6.0+15On demandDownload46f12f18…2603f3
0.6.0+16On demandDownload75f332d0…2443d1
0.6.0+17On demandDownload22bee814…e58cce
0.6.0+18On demandDownload7689bb07…b19fa7
0.6.0+19On demandDownloadf0708f1e…a4c5a6
0.6.0+20On demandDownloada4411902…bf784f
0.6.1On demandDownloadb95807cb…4956d6
0.6.1+1On demandDownload708032c7…a07e89
0.6.1+2On demandDownload8f03d188…113e91
0.6.1+3On demandDownload3d341203…910f46
0.6.1+4On demandDownloadc236dc02…689993
0.6.1+7On demandDownloadf46105d3…3bc909
0.6.1+8On demandDownloadc51c29f2…77dbb6
0.6.1+10On demandDownloada740f120…29c39f
0.6.1+11On demandDownloaddda1a657…93a156
0.6.2On demandDownload62844d7d…7f966c
0.6.2+1On demandDownload3cfe9482…49ebcc
0.6.2+2On demandDownload8a1358eb…139c07
0.6.2+3On demandDownload722904f3…92cfb1
0.6.3On demandDownload81565e1b…48daa0
0.6.3+1On demandDownload16b281b6…265ef3
0.6.3+3On demandDownload27954933…7ae199
0.6.3+4On demandDownloadcbaf35d7…a637d1
0.6.4On demandDownload7c68734b…a04e24
0.6.5On demandDownload50ceec6d…e8ce23
0.6.5+1On demandDownloaddd2eadf6…2ee9d8
0.6.5+2On demandDownload9cc0709e…186af4
0.6.5+3On demandDownloadbe333e66…82e201
0.6.6+1On demandDownloadb746c815…ec0c6a
0.6.6+4On demandDownloadebf3d84e…887348
0.6.6+5On demandDownloade58269cc…9b077d
0.6.7On demandDownloadde08b48b…e69927
0.6.7+1On demandDownload1d17f133…118d1b
0.6.7+2On demandDownload6eeeccd9…c2bba2
0.6.7+3On demandDownload51445281…ff6630
0.6.7+4On demandDownload41209e04…deecac
0.6.7+6On demandDownloadbbe22ff7…86ae46
0.6.7+7On demandDownload813e052f…a9f1c4
0.6.7+8On demandDownload6e2c815b…255eb6
0.6.7+9On demandDownloadded6c069…30438c
0.6.7+10On demandDownload125cc46d…2c69d8
0.6.7+11On demandDownload587b69b2…d806ab
0.6.7+12On demandDownload8cd896a3…87d95c
0.6.7+14On demandDownloadbcaab33e…17a144
0.6.7+15On demandDownload3da1fb3e…121754
0.6.7+17On demandDownload5e925dbb…390d9d
0.6.7+20On demandDownloadc9900b70…87d289
0.6.7+21On demandDownload464bcc6f…9615e7
0.6.7+22On demandDownload751a0922…5668f4
0.7.0-nullsafetyOn demandDownload0dc32219…f12330
0.7.0On demandDownload6ef5aa1c…965c8b
0.7.1On demandDownloadee6cd751…431cf8
0.7.2On demandDownloadad282648…1d319e
0.7.2+1On demandDownload8f496a46…2e8607
0.7.3On demandDownload357b67b7…5c4343
0.7.4On demandDownload5c18ae74…9e2a1c
0.7.5On demandDownloada42f8862…9b4468
0.7.5+1On demandDownloadda2ed778…37339b
0.7.5+2On demandDownload27290bdb…16a32c
0.7.5+3On demandDownload28f76917…a05f42
0.7.5+4On demandDownloadb4f02353…d78df6
0.8.0On demandDownloadb5e65957…dc0df4
0.8.0+1On demandDownloada4df465c…472b44
0.8.0+2On demandDownload92d819e5…51101a
0.8.0+3On demandDownload4b2b6142…7a2a60
0.8.0+4On demandDownload51ba8f58…89d147
0.8.1On demandDownload61df3fc0…486bb1
0.8.1+1On demandDownloadac9ae863…ad6a41
0.8.1+2On demandDownload88f4deb9…75e22a
0.8.1+3On demandDownloada84675b4…27e501
0.8.1+4On demandDownload0438e4ce…d683bd
0.8.2On demandDownload93aa7ada…cbdd34
0.8.3On demandDownloadc40497f1…91f9e7
0.8.3+1On demandDownloadf7e93321…76b676
0.8.3+2On demandDownload5cd82e26…6d8a18
0.8.3+3On demandDownload498e16ad…65f398
0.8.4On demandDownloadc0fea915…ec7de0
0.8.4+1On demandDownload8da3e795…14cd68
0.8.4+2On demandDownload401a3a3c…21cc02
0.8.4+3On demandDownloadc814bfa3…4473a2
0.8.4+4On demandDownload5f29bb69…d8355e
0.8.4+5On demandDownload04ad4167…d16644
0.8.4+6On demandDownloadf9dd0b4a…8c145b
0.8.4+7On demandDownload54be94c8…96c802
0.8.4+8On demandDownload4a82ddeb…66f8c7
0.8.4+9On demandDownload1fd6890a…b090b8
0.8.4+10On demandDownload28769e99…222dc3
0.8.4+11On demandDownloadf6147d31…308e9c
0.8.5On demandDownloadc4518b23…8ea431
0.8.5+1On demandDownload4944dcd5…789015
0.8.5+2On demandDownload927a8bee…070ffd
0.8.5+3On demandDownloadf3712cd1…df8ea6
0.8.6On demandDownloada8f2f0ae…5328cd
0.8.6+1On demandDownloadf98d7667…b2aabe
0.8.6+2On demandDownloadd39cc124…d32551
0.8.6+3On demandDownload22207768…51f66a
0.8.6+4On demandDownload715d68a5…bf51ed
0.8.7On demandDownload64b21d9f…f8e9f8
0.8.7+1On demandDownloadcb25f045…e95494
0.8.7+2On demandDownload8b0efbf3…b90cfa
0.8.7+3On demandDownloadf202f5d7…af25e6
0.8.7+4On demandDownload3da954c3…83a263
0.8.7+5On demandDownload9978d351…a4d270
0.8.8On demandDownload64321785…4d05e9
0.8.9On demandDownloadb6951e25…b4607c
1.0.0On demandDownloadb9603755…c1c5b5
1.0.1On demandDownload6296e987…a7f7b3
1.0.2On demandDownload84183725…b33c14
1.0.3On demandDownload86672440…a3ad3a
1.0.4On demandDownload7d7f2768…50ba84
1.0.5On demandDownloadfc712337…b03c77
1.0.6On demandDownload340efe08…68262b
1.0.7On demandDownload26222b01…ac0bdd
1.0.8On demandDownload1f498d08…6b02c8
1.1.0On demandDownloadfe9ee64c…30a7a5
1.1.1On demandDownload33974eca…edf720
1.1.2On demandDownload021834d9…867f7a
1.2.0Cached · Upstream SHA-256 matchedDownload736eb56a…cf5041
1.2.1On demandDownload78421011…4fa320
1.2.2On demandDownload91c02542…a7d9ac
1.2.3On demandDownloadd8402284…602667
1.2.4Cached · Upstream SHA-256 matchedDownloade71b1bd9…17013a

Dependencies

flutter { "sdk": "flutter" }

image_picker_android "^0.8.13"

image_picker_for_web "^3.1.0"

image_picker_ios "^0.8.13"

image_picker_linux "^0.2.2"

image_picker_macos "^0.2.2"

image_picker_platform_interface "^2.11.0"

image_picker_windows "^0.2.2"