Skip to content

Commit

Permalink
mistakes were made
Browse files Browse the repository at this point in the history
  • Loading branch information
tarrinneal committed May 23, 2023
1 parent 1d6732b commit 34a83bc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/image_picker/image_picker/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ class _MyHomePageState extends State<MyHomePage> {
await _displayPickImageDialog(context,
(double? maxWidth, double? maxHeight, int? quality) async {
try {
final List<XFile> pickedFileList = [];
final List<XFile> pickedFileList = <XFile>[];
final XFile? media = await _picker.pickMedia(
maxWidth: maxWidth,
maxHeight: maxHeight,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,7 @@ public void pickMedia(
@NonNull Messages.ImageSelectionOptions imageOptions,
@NonNull Messages.VideoSelectionOptions videoOptions,
@NonNull Boolean usePhotoPicker,
@NonNull Boolean allowMultiple,
@NonNull Result<List<String>> result) {
ImagePickerDelegate delegate = getImagePickerDelegate();
if (delegate == null) {
Expand All @@ -340,7 +341,7 @@ public void pickMedia(
"no_activity", "image_picker plugin requires a foreground activity.", null));
return;
}
delegate.chooseMediaFromGallery(imageOptions, videoOptions, usePhotoPicker, result);
delegate.chooseMediaFromGallery(imageOptions, videoOptions, usePhotoPicker, allowMultiple, result);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ - (void)testPickMediaShouldUseUIImagePickerControllerOnPreiOS14 {
pickMediaWithMaxSize:[FLTMaxSize makeWithWidth:@(100) height:@(200)]
quality:@(50)
fullMetadata:@YES
allowMultiple:@YES
completion:^(NSArray<NSString *> *_Nullable result, FlutterError *_Nullable error){
}];
OCMVerify(times(1),
Expand Down Expand Up @@ -251,6 +252,8 @@ - (void)testPickMediaWithoutFullMetadata {
pickMediaWithMaxSize:[[FLTMaxSize alloc] init]
quality:nil
fullMetadata:@NO
allowMultiple:@YES

completion:^(NSArray<NSString *> *_Nullable result, FlutterError *_Nullable error){
}];

Expand Down

0 comments on commit 34a83bc

Please sign in to comment.