You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: packages/image_picker/image_picker/README.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,6 +23,7 @@ As a result of implementing PHPicker it becomes impossible to pick HEIC images o
23
23
Add the following keys to your _Info.plist_ file, located in `<project root>/ios/Runner/Info.plist`:
24
24
25
25
*`NSPhotoLibraryUsageDescription` - describe why your app needs permission for the photo library. This is called _Privacy - Photo Library Usage Description_ in the visual editor.
26
+
* This permission is not required for image picking on iOS 11+ if you pass `false` for `requestFullMetadata`.
26
27
*`NSCameraUsageDescription` - describe why your app needs access to the camera. This is called _Privacy - Camera Usage Description_ in the visual editor.
27
28
*`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.
Copy file name to clipboardExpand all lines: packages/image_picker/image_picker/lib/image_picker.dart
+48-22Lines changed: 48 additions & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -173,23 +173,32 @@ class ImagePicker {
173
173
/// The `source` argument controls where the image comes from. This can
174
174
/// be either [ImageSource.camera] or [ImageSource.gallery].
175
175
///
176
-
/// Where iOS supports HEIC images, Android 8 and below doesn't. Android 9 and above only support HEIC images if used
177
-
/// in addition to a size modification, of which the usage is explained below.
176
+
/// Where iOS supports HEIC images, Android 8 and below doesn't. Android 9 and
177
+
/// above only support HEIC images if used in addition to a size modification,
178
+
/// of which the usage is explained below.
178
179
///
179
180
/// If specified, the image will be at most `maxWidth` wide and
180
181
/// `maxHeight` tall. Otherwise the image will be returned at it's
181
182
/// original width and height.
182
183
/// The `imageQuality` argument modifies the quality of the image, ranging from 0-100
183
184
/// where 100 is the original/max quality. If `imageQuality` is null, the image with
184
185
/// the original quality will be returned. Compression is only supported for certain
185
-
/// image types such as JPEG and on Android PNG and WebP, too. If compression is not supported for the image that is picked,
186
-
/// a warning message will be logged.
187
-
///
188
-
/// Use `preferredCameraDevice` to specify the camera to use when the `source` is [ImageSource.camera].
189
-
/// The `preferredCameraDevice` is ignored when `source` is [ImageSource.gallery]. It is also ignored if the chosen camera is not supported on the device.
190
-
/// Defaults to [CameraDevice.rear]. Note that Android has no documented parameter for an intent to specify if
191
-
/// the front or rear camera should be opened, this function is not guaranteed
192
-
/// to work on an Android device.
186
+
/// image types such as JPEG and on Android PNG and WebP, too. If compression is not
187
+
/// supported for the image that is picked, a warning message will be logged.
188
+
///
189
+
/// Use `preferredCameraDevice` to specify the camera to use when the `source` is
190
+
/// [ImageSource.camera].
191
+
/// The `preferredCameraDevice` is ignored when `source` is [ImageSource.gallery].
192
+
/// It is also ignored if the chosen camera is not supported on the device.
193
+
/// Defaults to [CameraDevice.rear]. Note that Android has no documented parameter
194
+
/// for an intent to specify if the front or rear camera should be opened, this
195
+
/// function is not guaranteed to work on an Android device.
196
+
///
197
+
/// Use `requestFullMetadata` (defaults to `true`) to control how much additional
198
+
/// information the plugin tries to get.
199
+
/// If `requestFullMetadata` is set to `true`, the plugin tries to get the full
200
+
/// image metadata which may require extra permission requests on some platforms,
201
+
/// such as `Photo Library Usage` permission on iOS.
193
202
///
194
203
/// In Android, the MainActivity can be destroyed for various reasons. If that happens, the result will be lost
195
204
/// in this call. You can then call [retrieveLostData] when your app relaunches to retrieve the lost data.
0 commit comments