Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

[image_picker] Fix camera alert localization analyzer warning #3939

Merged
merged 2 commits into from
May 20, 2021
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: 4 additions & 1 deletion packages/image_picker/image_picker/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
## 0.7.5+3
* Localize `UIAlertController` strings.

## 0.7.5+2
* Implement `UIAlertController` with a preferredStyle of `UIAlertControllerStyleAlert` since `UIAlertView` is deprecated.

## 0.7.5+1

* Fixes a rotation problem where Select Photos limited access is chosen but the image that is picked
* Fixes a rotation problem where Select Photos limited access is chosen but the image that is picked
is not included selected photos and image is scaled.

## 0.7.5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,14 +190,17 @@ - (void)showCamera {
animated:YES
completion:nil];
} else {
UIAlertController *cameraErrorAlert =
[UIAlertController alertControllerWithTitle:@"Error"
message:@"Camera not available."
preferredStyle:UIAlertControllerStyleAlert];
[cameraErrorAlert addAction:[UIAlertAction actionWithTitle:@"OK"
style:UIAlertActionStyleDefault
handler:^(UIAlertAction *action){
}]];
UIAlertController *cameraErrorAlert = [UIAlertController
alertControllerWithTitle:NSLocalizedString(@"Error", @"Alert title when camera unavailable")
message:NSLocalizedString(@"Camera not available.",
"Alert message when camera unavailable")
preferredStyle:UIAlertControllerStyleAlert];
[cameraErrorAlert
addAction:[UIAlertAction actionWithTitle:NSLocalizedString(
@"OK", @"Alert button when camera unavailable")
style:UIAlertActionStyleDefault
handler:^(UIAlertAction *action){
}]];
[[self viewControllerWithWindow:nil] presentViewController:cameraErrorAlert
animated:YES
completion:nil];
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 @@ -2,7 +2,7 @@ name: image_picker
description: Flutter plugin for selecting images from the Android and iOS image
library, and taking new pictures with the camera.
homepage: https://github.com/flutter/plugins/tree/master/packages/image_picker/image_picker
version: 0.7.5+2
version: 0.7.5+3

flutter:
plugin:
Expand Down