From 3814ec472be2e3f136e25079adf93212646b8a66 Mon Sep 17 00:00:00 2001 From: Tarrin Neal Date: Thu, 9 Mar 2023 03:22:21 -0800 Subject: [PATCH] [image_picker] moves Android 13 image picker to options (#3370) [image_picker] moves Android 13 image picker to options --- .../image_picker/image_picker/CHANGELOG.md | 3 +- packages/image_picker/image_picker/README.md | 5 ++ .../image_picker/image_picker/pubspec.yaml | 2 +- .../image_picker_android/CHANGELOG.md | 4 ++ .../image_picker_android/README.md | 20 ++++++ .../imagepicker/ImagePickerDelegate.java | 36 +++++++--- .../imagepicker/ImagePickerDelegateTest.java | 5 ++ .../example/build.excerpt.yaml | 15 +++++ .../example/lib/main.dart | 11 ++++ .../image_picker_android/example/pubspec.yaml | 1 + .../lib/image_picker_android.dart | 10 ++- .../image_picker_android/pubspec.yaml | 2 +- .../test/image_picker_android_test.dart | 66 +++++++++++++++++++ 13 files changed, 167 insertions(+), 13 deletions(-) create mode 100644 packages/image_picker/image_picker_android/example/build.excerpt.yaml mode change 100755 => 100644 packages/image_picker/image_picker_android/example/pubspec.yaml diff --git a/packages/image_picker/image_picker/CHANGELOG.md b/packages/image_picker/image_picker/CHANGELOG.md index 7969e21c8566..fe845b3ab7a9 100644 --- a/packages/image_picker/image_picker/CHANGELOG.md +++ b/packages/image_picker/image_picker/CHANGELOG.md @@ -1,5 +1,6 @@ -## NEXT +## 0.8.7 +* Adds `usePhotoPickerAndroid` options. * Aligns Dart and Flutter SDK constraints. ## 0.8.6+4 diff --git a/packages/image_picker/image_picker/README.md b/packages/image_picker/image_picker/README.md index 6c886f0c6536..3d5a11a73ae4 100755 --- a/packages/image_picker/image_picker/README.md +++ b/packages/image_picker/image_picker/README.md @@ -93,6 +93,11 @@ case. Please refer to the [example app](https://pub.dev/packages/image_picker/example) for a more complete example of handling this flow. +### Android Photo Picker + +This package has optional [Android Photo Picker](https://developer.android.com/training/data-storage/shared/photopicker) functionality. +[Learn how to use it](https://pub.dev/packages/image_picker_android). + ## Migrating to 0.8.2+ Starting with version **0.8.2** of the image_picker plugin, new methods have been added for picking files that return `XFile` instances (from the [cross_file](https://pub.dev/packages/cross_file) package) rather than the plugin's own `PickedFile` instances. While the previous methods still exist, it is already recommended to start migrating over to their new equivalents. Eventually, `PickedFile` and the methods that return instances of it will be deprecated and removed. diff --git a/packages/image_picker/image_picker/pubspec.yaml b/packages/image_picker/image_picker/pubspec.yaml index 86a8280e06b7..43c7ee3202bf 100755 --- a/packages/image_picker/image_picker/pubspec.yaml +++ b/packages/image_picker/image_picker/pubspec.yaml @@ -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/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: 0.8.6+4 +version: 0.8.7 environment: sdk: ">=2.17.0 <3.0.0" diff --git a/packages/image_picker/image_picker_android/CHANGELOG.md b/packages/image_picker/image_picker_android/CHANGELOG.md index bc0c6c463883..b9ca0c5533f5 100644 --- a/packages/image_picker/image_picker_android/CHANGELOG.md +++ b/packages/image_picker/image_picker_android/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.8.6 + +* Adds `usePhotoPickerAndroid` options. + ## 0.8.5+10 * Clarifies explanation of endorsement in README. diff --git a/packages/image_picker/image_picker_android/README.md b/packages/image_picker/image_picker_android/README.md index 7602dbee4992..32bc0206ef02 100755 --- a/packages/image_picker/image_picker_android/README.md +++ b/packages/image_picker/image_picker_android/README.md @@ -1,3 +1,5 @@ + + # image\_picker\_android The Android implementation of [`image_picker`][1]. @@ -11,5 +13,23 @@ so you do not need to add it to your `pubspec.yaml`. However, if you `import` this package to use any of its APIs directly, you should add it to your `pubspec.yaml` as usual. +## Photo Picker + +This package has optional Android Photo Picker functionality. + +To use this feature, add the following code to your app before calling any `image_picker` APIs: + + +```dart +import 'package:image_picker_android/image_picker_android.dart'; +import 'package:image_picker_platform_interface/image_picker_platform_interface.dart'; +// ยทยทยท + final ImagePickerPlatform imagePickerImplementation = + ImagePickerPlatform.instance; + if (imagePickerImplementation is ImagePickerAndroid) { + imagePickerImplementation.useAndroidPhotoPicker = true; + } +``` + [1]: https://pub.dev/packages/image_picker [2]: https://flutter.dev/docs/development/packages-and-plugins/developing-packages#endorsed-federated-plugin diff --git a/packages/image_picker/image_picker_android/android/src/main/java/io/flutter/plugins/imagepicker/ImagePickerDelegate.java b/packages/image_picker/image_picker_android/android/src/main/java/io/flutter/plugins/imagepicker/ImagePickerDelegate.java index 006eb3dad47a..8f89e05276cd 100644 --- a/packages/image_picker/image_picker_android/android/src/main/java/io/flutter/plugins/imagepicker/ImagePickerDelegate.java +++ b/packages/image_picker/image_picker_android/android/src/main/java/io/flutter/plugins/imagepicker/ImagePickerDelegate.java @@ -252,12 +252,18 @@ public void chooseVideoFromGallery(MethodCall methodCall, MethodChannel.Result r return; } - launchPickVideoFromGalleryIntent(); + Boolean usePhotoPicker = methodCall.argument("useAndroidPhotoPicker"); + + if (usePhotoPicker == null) { + usePhotoPicker = false; + } + + launchPickVideoFromGalleryIntent(usePhotoPicker); } - private void launchPickVideoFromGalleryIntent() { + private void launchPickVideoFromGalleryIntent(Boolean useAndroidPhotoPicker) { Intent pickVideoIntent; - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { + if (useAndroidPhotoPicker && Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { pickVideoIntent = new ActivityResultContracts.PickVisualMedia() .createIntent( @@ -326,7 +332,13 @@ public void chooseImageFromGallery(MethodCall methodCall, MethodChannel.Result r return; } - launchPickImageFromGalleryIntent(); + Boolean usePhotoPicker = methodCall.argument("useAndroidPhotoPicker"); + + if (usePhotoPicker == null) { + usePhotoPicker = false; + } + + launchPickImageFromGalleryIntent(usePhotoPicker); } public void chooseMultiImageFromGallery(MethodCall methodCall, MethodChannel.Result result) { @@ -335,12 +347,18 @@ public void chooseMultiImageFromGallery(MethodCall methodCall, MethodChannel.Res return; } - launchMultiPickImageFromGalleryIntent(); + Boolean usePhotoPicker = methodCall.argument("useAndroidPhotoPicker"); + + if (usePhotoPicker == null) { + usePhotoPicker = false; + } + + launchMultiPickImageFromGalleryIntent(usePhotoPicker); } - private void launchPickImageFromGalleryIntent() { + private void launchPickImageFromGalleryIntent(Boolean useAndroidPhotoPicker) { Intent pickImageIntent; - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { + if (useAndroidPhotoPicker && Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { pickImageIntent = new ActivityResultContracts.PickVisualMedia() .createIntent( @@ -356,9 +374,9 @@ private void launchPickImageFromGalleryIntent() { activity.startActivityForResult(pickImageIntent, REQUEST_CODE_CHOOSE_IMAGE_FROM_GALLERY); } - private void launchMultiPickImageFromGalleryIntent() { + private void launchMultiPickImageFromGalleryIntent(Boolean useAndroidPhotoPicker) { Intent pickMultiImageIntent; - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { + if (useAndroidPhotoPicker && Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { pickMultiImageIntent = new ActivityResultContracts.PickMultipleVisualMedia() .createIntent( diff --git a/packages/image_picker/image_picker_android/android/src/test/java/io/flutter/plugins/imagepicker/ImagePickerDelegateTest.java b/packages/image_picker/image_picker_android/android/src/test/java/io/flutter/plugins/imagepicker/ImagePickerDelegateTest.java index 29302d90bffd..f8fb4dbb2418 100644 --- a/packages/image_picker/image_picker_android/android/src/test/java/io/flutter/plugins/imagepicker/ImagePickerDelegateTest.java +++ b/packages/image_picker/image_picker_android/android/src/test/java/io/flutter/plugins/imagepicker/ImagePickerDelegateTest.java @@ -162,6 +162,7 @@ public void chooseMultiImageFromGallery_WhenPendingResultExists_FinishesWithAlre chooseImageFromGallery_WithPhotoPicker_WhenHasExternalStoragePermission_LaunchesChooseFromGalleryIntent() { when(mockPermissionManager.isPermissionGranted(Manifest.permission.READ_EXTERNAL_STORAGE)) .thenReturn(true); + when(mockMethodCall.argument("useAndroidPhotoPicker")).thenReturn(true); ImagePickerDelegate delegate = createDelegate(); delegate.chooseImageFromGallery(mockMethodCall, mockResult); @@ -177,6 +178,7 @@ public void chooseMultiImageFromGallery_WhenPendingResultExists_FinishesWithAlre chooseMultiImageFromGallery_WhenHasExternalStoragePermission_LaunchesChooseFromGalleryIntent() { when(mockPermissionManager.isPermissionGranted(Manifest.permission.READ_EXTERNAL_STORAGE)) .thenReturn(true); + when(mockMethodCall.argument("useAndroidPhotoPicker")).thenReturn(true); ImagePickerDelegate delegate = createDelegate(); delegate.chooseMultiImageFromGallery(mockMethodCall, mockResult); @@ -193,6 +195,7 @@ public void chooseMultiImageFromGallery_WhenPendingResultExists_FinishesWithAlre chooseMultiImageFromGallery_WithPhotoPicker_WhenHasExternalStoragePermission_LaunchesChooseFromGalleryIntent() { when(mockPermissionManager.isPermissionGranted(Manifest.permission.READ_EXTERNAL_STORAGE)) .thenReturn(true); + when(mockMethodCall.argument("useAndroidPhotoPicker")).thenReturn(true); ImagePickerDelegate delegate = createDelegate(); delegate.chooseMultiImageFromGallery(mockMethodCall, mockResult); @@ -209,6 +212,7 @@ public void chooseMultiImageFromGallery_WhenPendingResultExists_FinishesWithAlre chooseVideoFromGallery_WhenHasExternalStoragePermission_LaunchesChooseFromGalleryIntent() { when(mockPermissionManager.isPermissionGranted(Manifest.permission.READ_EXTERNAL_STORAGE)) .thenReturn(true); + when(mockMethodCall.argument("useAndroidPhotoPicker")).thenReturn(true); ImagePickerDelegate delegate = createDelegate(); delegate.chooseVideoFromGallery(mockMethodCall, mockResult); @@ -224,6 +228,7 @@ public void chooseMultiImageFromGallery_WhenPendingResultExists_FinishesWithAlre chooseVideoFromGallery_WithPhotoPicker_WhenHasExternalStoragePermission_LaunchesChooseFromGalleryIntent() { when(mockPermissionManager.isPermissionGranted(Manifest.permission.READ_EXTERNAL_STORAGE)) .thenReturn(true); + when(mockMethodCall.argument("useAndroidPhotoPicker")).thenReturn(true); ImagePickerDelegate delegate = createDelegate(); delegate.chooseVideoFromGallery(mockMethodCall, mockResult); diff --git a/packages/image_picker/image_picker_android/example/build.excerpt.yaml b/packages/image_picker/image_picker_android/example/build.excerpt.yaml new file mode 100644 index 000000000000..e317efa11cb3 --- /dev/null +++ b/packages/image_picker/image_picker_android/example/build.excerpt.yaml @@ -0,0 +1,15 @@ +targets: + $default: + sources: + include: + - lib/** + # Some default includes that aren't really used here but will prevent + # false-negative warnings: + - $package$ + - lib/$lib$ + exclude: + - '**/.*/**' + - '**/build/**' + builders: + code_excerpter|code_excerpter: + enabled: true diff --git a/packages/image_picker/image_picker_android/example/lib/main.dart b/packages/image_picker/image_picker_android/example/lib/main.dart index 2e5b2e5cbd8d..c456fb98dc1c 100755 --- a/packages/image_picker/image_picker_android/example/lib/main.dart +++ b/packages/image_picker/image_picker_android/example/lib/main.dart @@ -10,7 +10,10 @@ import 'dart:io'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter_driver/driver_extension.dart'; +// #docregion photo-picker-example +import 'package:image_picker_android/image_picker_android.dart'; import 'package:image_picker_platform_interface/image_picker_platform_interface.dart'; +// #enddocregion photo-picker-example import 'package:video_player/video_player.dart'; void appMain() { @@ -19,6 +22,14 @@ void appMain() { } void main() { + // Set to use Android Photo Picker. + // #docregion photo-picker-example + final ImagePickerPlatform imagePickerImplementation = + ImagePickerPlatform.instance; + if (imagePickerImplementation is ImagePickerAndroid) { + imagePickerImplementation.useAndroidPhotoPicker = true; + } + // #enddocregion photo-picker-example runApp(const MyApp()); } diff --git a/packages/image_picker/image_picker_android/example/pubspec.yaml b/packages/image_picker/image_picker_android/example/pubspec.yaml old mode 100755 new mode 100644 index 5b0f3e09774e..52778a441eb5 --- a/packages/image_picker/image_picker_android/example/pubspec.yaml +++ b/packages/image_picker/image_picker_android/example/pubspec.yaml @@ -23,6 +23,7 @@ dependencies: video_player: ^2.1.4 dev_dependencies: + build_runner: ^2.1.10 espresso: ^0.2.0 flutter_test: sdk: flutter diff --git a/packages/image_picker/image_picker_android/lib/image_picker_android.dart b/packages/image_picker/image_picker_android/lib/image_picker_android.dart index b6073c7a436a..97c981eb3178 100644 --- a/packages/image_picker/image_picker_android/lib/image_picker_android.dart +++ b/packages/image_picker/image_picker_android/lib/image_picker_android.dart @@ -83,6 +83,7 @@ class ImagePickerAndroid extends ImagePickerPlatform { 'maxWidth': maxWidth, 'maxHeight': maxHeight, 'imageQuality': imageQuality, + 'useAndroidPhotoPicker': useAndroidPhotoPicker, }, ); } @@ -117,6 +118,7 @@ class ImagePickerAndroid extends ImagePickerPlatform { 'imageQuality': imageQuality, 'cameraDevice': preferredCameraDevice.index, 'requestFullMetadata': requestFullMetadata, + 'useAndroidPhotoPicker': useAndroidPhotoPicker, }, ); } @@ -145,7 +147,8 @@ class ImagePickerAndroid extends ImagePickerPlatform { { 'source': source.index, 'maxDuration': maxDuration?.inSeconds, - 'cameraDevice': preferredCameraDevice.index + 'cameraDevice': preferredCameraDevice.index, + 'useAndroidPhotoPicker': useAndroidPhotoPicker, }, ); } @@ -279,4 +282,9 @@ class ImagePickerAndroid extends ImagePickerPlatform { files: pickedFileList, ); } + + /// Set [ImagePickerAndroid] to use Android 13 Photo Picker. + /// + /// Currently defaults to false, but the default is subject to change. + bool useAndroidPhotoPicker = false; } diff --git a/packages/image_picker/image_picker_android/pubspec.yaml b/packages/image_picker/image_picker_android/pubspec.yaml index 30b95c3ff175..1c22e9c93669 100755 --- a/packages/image_picker/image_picker_android/pubspec.yaml +++ b/packages/image_picker/image_picker_android/pubspec.yaml @@ -3,7 +3,7 @@ description: Android implementation of the image_picker plugin. repository: https://github.com/flutter/packages/tree/main/packages/image_picker/image_picker_android issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+image_picker%22 -version: 0.8.5+10 +version: 0.8.6 environment: sdk: ">=2.17.0 <3.0.0" diff --git a/packages/image_picker/image_picker_android/test/image_picker_android_test.dart b/packages/image_picker/image_picker_android/test/image_picker_android_test.dart index d6680ce44dd5..4c9d31ae2b9a 100644 --- a/packages/image_picker/image_picker_android/test/image_picker_android_test.dart +++ b/packages/image_picker/image_picker_android/test/image_picker_android_test.dart @@ -49,6 +49,7 @@ void main() { 'imageQuality': null, 'cameraDevice': 0, 'requestFullMetadata': true, + 'useAndroidPhotoPicker': false, }), isMethodCall('pickImage', arguments: { 'source': 1, @@ -57,6 +58,7 @@ void main() { 'imageQuality': null, 'cameraDevice': 0, 'requestFullMetadata': true, + 'useAndroidPhotoPicker': false, }), ], ); @@ -104,6 +106,7 @@ void main() { 'imageQuality': null, 'cameraDevice': 0, 'requestFullMetadata': true, + 'useAndroidPhotoPicker': false, }), isMethodCall('pickImage', arguments: { 'source': 0, @@ -112,6 +115,7 @@ void main() { 'imageQuality': null, 'cameraDevice': 0, 'requestFullMetadata': true, + 'useAndroidPhotoPicker': false, }), isMethodCall('pickImage', arguments: { 'source': 0, @@ -120,6 +124,7 @@ void main() { 'imageQuality': null, 'cameraDevice': 0, 'requestFullMetadata': true, + 'useAndroidPhotoPicker': false, }), isMethodCall('pickImage', arguments: { 'source': 0, @@ -128,6 +133,7 @@ void main() { 'imageQuality': null, 'cameraDevice': 0, 'requestFullMetadata': true, + 'useAndroidPhotoPicker': false, }), isMethodCall('pickImage', arguments: { 'source': 0, @@ -136,6 +142,7 @@ void main() { 'imageQuality': 70, 'cameraDevice': 0, 'requestFullMetadata': true, + 'useAndroidPhotoPicker': false, }), isMethodCall('pickImage', arguments: { 'source': 0, @@ -144,6 +151,7 @@ void main() { 'imageQuality': 70, 'cameraDevice': 0, 'requestFullMetadata': true, + 'useAndroidPhotoPicker': false, }), isMethodCall('pickImage', arguments: { 'source': 0, @@ -152,6 +160,7 @@ void main() { 'imageQuality': 70, 'cameraDevice': 0, 'requestFullMetadata': true, + 'useAndroidPhotoPicker': false, }), ], ); @@ -214,6 +223,7 @@ void main() { 'imageQuality': null, 'cameraDevice': 0, 'requestFullMetadata': true, + 'useAndroidPhotoPicker': false, }), ], ); @@ -234,6 +244,7 @@ void main() { 'imageQuality': null, 'cameraDevice': 1, 'requestFullMetadata': true, + 'useAndroidPhotoPicker': false, }), ], ); @@ -252,6 +263,7 @@ void main() { 'maxWidth': null, 'maxHeight': null, 'imageQuality': null, + 'useAndroidPhotoPicker': false, }), ], ); @@ -291,36 +303,43 @@ void main() { 'maxWidth': null, 'maxHeight': null, 'imageQuality': null, + 'useAndroidPhotoPicker': false, }), isMethodCall('pickMultiImage', arguments: { 'maxWidth': 10.0, 'maxHeight': null, 'imageQuality': null, + 'useAndroidPhotoPicker': false, }), isMethodCall('pickMultiImage', arguments: { 'maxWidth': null, 'maxHeight': 10.0, 'imageQuality': null, + 'useAndroidPhotoPicker': false, }), isMethodCall('pickMultiImage', arguments: { 'maxWidth': 10.0, 'maxHeight': 20.0, 'imageQuality': null, + 'useAndroidPhotoPicker': false, }), isMethodCall('pickMultiImage', arguments: { 'maxWidth': 10.0, 'maxHeight': null, 'imageQuality': 70, + 'useAndroidPhotoPicker': false, }), isMethodCall('pickMultiImage', arguments: { 'maxWidth': null, 'maxHeight': 10.0, 'imageQuality': 70, + 'useAndroidPhotoPicker': false, }), isMethodCall('pickMultiImage', arguments: { 'maxWidth': 10.0, 'maxHeight': 20.0, 'imageQuality': 70, + 'useAndroidPhotoPicker': false, }), ], ); @@ -375,11 +394,13 @@ void main() { 'source': 0, 'cameraDevice': 0, 'maxDuration': null, + 'useAndroidPhotoPicker': false, }), isMethodCall('pickVideo', arguments: { 'source': 1, 'cameraDevice': 0, 'maxDuration': null, + 'useAndroidPhotoPicker': false, }), ], ); @@ -406,21 +427,25 @@ void main() { 'source': 0, 'maxDuration': null, 'cameraDevice': 0, + 'useAndroidPhotoPicker': false, }), isMethodCall('pickVideo', arguments: { 'source': 0, 'maxDuration': 10, 'cameraDevice': 0, + 'useAndroidPhotoPicker': false, }), isMethodCall('pickVideo', arguments: { 'source': 0, 'maxDuration': 60, 'cameraDevice': 0, + 'useAndroidPhotoPicker': false, }), isMethodCall('pickVideo', arguments: { 'source': 0, 'maxDuration': 3600, 'cameraDevice': 0, + 'useAndroidPhotoPicker': false, }), ], ); @@ -446,6 +471,7 @@ void main() { 'source': 0, 'cameraDevice': 0, 'maxDuration': null, + 'useAndroidPhotoPicker': false, }), ], ); @@ -464,6 +490,7 @@ void main() { 'source': 0, 'maxDuration': null, 'cameraDevice': 1, + 'useAndroidPhotoPicker': false, }), ], ); @@ -546,6 +573,7 @@ void main() { 'imageQuality': null, 'cameraDevice': 0, 'requestFullMetadata': true, + 'useAndroidPhotoPicker': false, }), isMethodCall('pickImage', arguments: { 'source': 1, @@ -554,6 +582,7 @@ void main() { 'imageQuality': null, 'cameraDevice': 0, 'requestFullMetadata': true, + 'useAndroidPhotoPicker': false, }), ], ); @@ -601,6 +630,7 @@ void main() { 'imageQuality': null, 'cameraDevice': 0, 'requestFullMetadata': true, + 'useAndroidPhotoPicker': false, }), isMethodCall('pickImage', arguments: { 'source': 0, @@ -609,6 +639,7 @@ void main() { 'imageQuality': null, 'cameraDevice': 0, 'requestFullMetadata': true, + 'useAndroidPhotoPicker': false, }), isMethodCall('pickImage', arguments: { 'source': 0, @@ -617,6 +648,7 @@ void main() { 'imageQuality': null, 'cameraDevice': 0, 'requestFullMetadata': true, + 'useAndroidPhotoPicker': false, }), isMethodCall('pickImage', arguments: { 'source': 0, @@ -625,6 +657,7 @@ void main() { 'imageQuality': null, 'cameraDevice': 0, 'requestFullMetadata': true, + 'useAndroidPhotoPicker': false, }), isMethodCall('pickImage', arguments: { 'source': 0, @@ -633,6 +666,7 @@ void main() { 'imageQuality': 70, 'cameraDevice': 0, 'requestFullMetadata': true, + 'useAndroidPhotoPicker': false, }), isMethodCall('pickImage', arguments: { 'source': 0, @@ -641,6 +675,7 @@ void main() { 'imageQuality': 70, 'cameraDevice': 0, 'requestFullMetadata': true, + 'useAndroidPhotoPicker': false, }), isMethodCall('pickImage', arguments: { 'source': 0, @@ -649,6 +684,7 @@ void main() { 'imageQuality': 70, 'cameraDevice': 0, 'requestFullMetadata': true, + 'useAndroidPhotoPicker': false, }), ], ); @@ -711,6 +747,7 @@ void main() { 'imageQuality': null, 'cameraDevice': 0, 'requestFullMetadata': true, + 'useAndroidPhotoPicker': false, }), ], ); @@ -731,6 +768,7 @@ void main() { 'imageQuality': null, 'cameraDevice': 1, 'requestFullMetadata': true, + 'useAndroidPhotoPicker': false, }), ], ); @@ -749,6 +787,7 @@ void main() { 'maxWidth': null, 'maxHeight': null, 'imageQuality': null, + 'useAndroidPhotoPicker': false, }), ], ); @@ -788,36 +827,43 @@ void main() { 'maxWidth': null, 'maxHeight': null, 'imageQuality': null, + 'useAndroidPhotoPicker': false, }), isMethodCall('pickMultiImage', arguments: { 'maxWidth': 10.0, 'maxHeight': null, 'imageQuality': null, + 'useAndroidPhotoPicker': false, }), isMethodCall('pickMultiImage', arguments: { 'maxWidth': null, 'maxHeight': 10.0, 'imageQuality': null, + 'useAndroidPhotoPicker': false, }), isMethodCall('pickMultiImage', arguments: { 'maxWidth': 10.0, 'maxHeight': 20.0, 'imageQuality': null, + 'useAndroidPhotoPicker': false, }), isMethodCall('pickMultiImage', arguments: { 'maxWidth': 10.0, 'maxHeight': null, 'imageQuality': 70, + 'useAndroidPhotoPicker': false, }), isMethodCall('pickMultiImage', arguments: { 'maxWidth': null, 'maxHeight': 10.0, 'imageQuality': 70, + 'useAndroidPhotoPicker': false, }), isMethodCall('pickMultiImage', arguments: { 'maxWidth': 10.0, 'maxHeight': 20.0, 'imageQuality': 70, + 'useAndroidPhotoPicker': false, }), ], ); @@ -872,11 +918,13 @@ void main() { 'source': 0, 'cameraDevice': 0, 'maxDuration': null, + 'useAndroidPhotoPicker': false, }), isMethodCall('pickVideo', arguments: { 'source': 1, 'cameraDevice': 0, 'maxDuration': null, + 'useAndroidPhotoPicker': false, }), ], ); @@ -903,21 +951,25 @@ void main() { 'source': 0, 'maxDuration': null, 'cameraDevice': 0, + 'useAndroidPhotoPicker': false, }), isMethodCall('pickVideo', arguments: { 'source': 0, 'maxDuration': 10, 'cameraDevice': 0, + 'useAndroidPhotoPicker': false, }), isMethodCall('pickVideo', arguments: { 'source': 0, 'maxDuration': 60, 'cameraDevice': 0, + 'useAndroidPhotoPicker': false, }), isMethodCall('pickVideo', arguments: { 'source': 0, 'maxDuration': 3600, 'cameraDevice': 0, + 'useAndroidPhotoPicker': false, }), ], ); @@ -943,6 +995,7 @@ void main() { 'source': 0, 'cameraDevice': 0, 'maxDuration': null, + 'useAndroidPhotoPicker': false, }), ], ); @@ -961,6 +1014,7 @@ void main() { 'source': 0, 'maxDuration': null, 'cameraDevice': 1, + 'useAndroidPhotoPicker': false, }), ], ); @@ -1062,6 +1116,7 @@ void main() { 'imageQuality': null, 'cameraDevice': 0, 'requestFullMetadata': true, + 'useAndroidPhotoPicker': false, }), isMethodCall('pickImage', arguments: { 'source': 1, @@ -1070,6 +1125,7 @@ void main() { 'imageQuality': null, 'cameraDevice': 0, 'requestFullMetadata': true, + 'useAndroidPhotoPicker': false, }), ], ); @@ -1125,6 +1181,7 @@ void main() { 'imageQuality': null, 'cameraDevice': 0, 'requestFullMetadata': true, + 'useAndroidPhotoPicker': false, }), isMethodCall('pickImage', arguments: { 'source': 0, @@ -1133,6 +1190,7 @@ void main() { 'imageQuality': null, 'cameraDevice': 0, 'requestFullMetadata': true, + 'useAndroidPhotoPicker': false, }), isMethodCall('pickImage', arguments: { 'source': 0, @@ -1141,6 +1199,7 @@ void main() { 'imageQuality': null, 'cameraDevice': 0, 'requestFullMetadata': true, + 'useAndroidPhotoPicker': false, }), isMethodCall('pickImage', arguments: { 'source': 0, @@ -1149,6 +1208,7 @@ void main() { 'imageQuality': null, 'cameraDevice': 0, 'requestFullMetadata': true, + 'useAndroidPhotoPicker': false, }), isMethodCall('pickImage', arguments: { 'source': 0, @@ -1157,6 +1217,7 @@ void main() { 'imageQuality': 70, 'cameraDevice': 0, 'requestFullMetadata': true, + 'useAndroidPhotoPicker': false, }), isMethodCall('pickImage', arguments: { 'source': 0, @@ -1165,6 +1226,7 @@ void main() { 'imageQuality': 70, 'cameraDevice': 0, 'requestFullMetadata': true, + 'useAndroidPhotoPicker': false, }), isMethodCall('pickImage', arguments: { 'source': 0, @@ -1173,6 +1235,7 @@ void main() { 'imageQuality': 70, 'cameraDevice': 0, 'requestFullMetadata': true, + 'useAndroidPhotoPicker': false, }), ], ); @@ -1255,6 +1318,7 @@ void main() { 'imageQuality': null, 'cameraDevice': 0, 'requestFullMetadata': true, + 'useAndroidPhotoPicker': false, }), ], ); @@ -1278,6 +1342,7 @@ void main() { 'imageQuality': null, 'cameraDevice': 1, 'requestFullMetadata': true, + 'useAndroidPhotoPicker': false, }), ], ); @@ -1299,6 +1364,7 @@ void main() { 'imageQuality': null, 'cameraDevice': 0, 'requestFullMetadata': false, + 'useAndroidPhotoPicker': false, }), ], );