Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/image_picker/image_picker/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@

## 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
Expand Down
16 changes: 16 additions & 0 deletions packages/image_picker/image_picker/lib/image_picker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ class ImagePicker {
/// in this call. You can then call [getLostData] when your app relaunches to retrieve the lost data.
///
/// See also [getMultiImage] to allow users to select multiple images at once.
///
/// The method could throw [PlatformException] if the app does not have permission to access
/// the camera or photos gallery, no camera is available, plugin is already in use,
/// temporary file could not be created (iOS only), plugin activity could not
/// be allocated (Android only) or due to an unknown error.
Future<PickedFile?> getImage({
required ImageSource source,
double? maxWidth,
Expand Down Expand Up @@ -90,6 +95,11 @@ class ImagePicker {
/// image types such as JPEG and on Android PNG and WebP, too. If compression is not supported for the image that is picked,
/// a warning message will be logged.
///
/// The method could throw [PlatformException] if the app does not have permission to access
/// the camera or photos gallery, no camera is available, plugin is already in use,
/// temporary file could not be created (iOS only), plugin activity could not
/// be allocated (Android only) or due to an unknown error.
///
/// See also [getImage] to allow users to only pick a single image.
Future<List<PickedFile>?> getMultiImage({
double? maxWidth,
Expand Down Expand Up @@ -119,6 +129,12 @@ class ImagePicker {
///
/// In Android, the MainActivity can be destroyed for various fo reasons. If that happens, the result will be lost
/// in this call. You can then call [getLostData] when your app relaunches to retrieve the lost data.
///
/// The method could throw [PlatformException] if the app does not have permission to access
/// the camera or photos gallery, no camera is available, plugin is already in use,
/// temporary file could not be created and video could not be cached (iOS only),
/// plugin activity could not be allocated (Android only) or due to an unknown error.
///
Future<PickedFile?> getVideo({
required ImageSource source,
CameraDevice preferredCameraDevice = CameraDevice.rear,
Expand Down
2 changes: 1 addition & 1 deletion packages/image_picker/image_picker/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ 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/plugins/tree/master/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: 0.8.1
version: 0.8.1+1

environment:
sdk: ">=2.12.0 <3.0.0"
Expand Down