-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[image_picker] add requestFullMetadata for iOS (optional permissions)…
… - platform interface changes for multi image picking (#5914) Platform interface changes for #5915 - adding possibility to disable full metadata when picking multiple images
- Loading branch information
1 parent
300f970
commit 278bc66
Showing
7 changed files
with
331 additions
and
1 deletion.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
packages/image_picker/image_picker_platform_interface/CHANGELOG.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
packages/image_picker/image_picker_platform_interface/lib/src/types/image_options.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// Copyright 2013 The Flutter Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
/// Specifies image-specific options for picking. | ||
class ImageOptions { | ||
/// Creates an instance with the given [maxHeight], [maxWidth], [imageQuality] | ||
/// and [requestFullMetadata]. | ||
const ImageOptions({ | ||
this.maxHeight, | ||
this.maxWidth, | ||
this.imageQuality, | ||
this.requestFullMetadata = true, | ||
}); | ||
|
||
/// The maximum width of the image, in pixels. | ||
/// | ||
/// If null, the image will only be resized if [maxHeight] is specified. | ||
final double? maxWidth; | ||
|
||
/// The maximum height of the image, in pixels. | ||
/// | ||
/// If null, the image will only be resized if [maxWidth] is specified. | ||
final double? maxHeight; | ||
|
||
/// Modifies the quality of the image, ranging from 0-100 where 100 is the | ||
/// original/max quality. | ||
/// | ||
/// Compression is only supported for certain image types such as JPEG. If | ||
/// compression is not supported for the image that is picked, a warning | ||
/// message will be logged. | ||
/// | ||
/// If null, the image will be returned with the original quality. | ||
final int? imageQuality; | ||
|
||
/// If true, requests full image metadata, which may require extra permissions | ||
/// on some platforms, (e.g., NSPhotoLibraryUsageDescription on iOS). | ||
// | ||
// Defaults to true. | ||
final bool requestFullMetadata; | ||
} |
16 changes: 16 additions & 0 deletions
16
...mage_picker/image_picker_platform_interface/lib/src/types/multi_image_picker_options.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// Copyright 2013 The Flutter Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
import 'package:image_picker_platform_interface/src/types/image_options.dart'; | ||
|
||
/// Specifies options for picking multiple images from the device's gallery. | ||
class MultiImagePickerOptions { | ||
/// Creates an instance with the given [imageOptions]. | ||
const MultiImagePickerOptions({ | ||
this.imageOptions = const ImageOptions(), | ||
}); | ||
|
||
/// The image-specific options for picking. | ||
final ImageOptions imageOptions; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.