-
Notifications
You must be signed in to change notification settings - Fork 9.7k
[image_picker] return error in the event that permissions are not granted #1744
Conversation
|
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here (e.g. What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
Signed the CLA |
|
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
| if (permissionGranted) { | ||
| launchPickImageFromGalleryIntent(); | ||
| } else { | ||
| finishWithError("photo_access_denied", "The user did not allow photo access."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe combine these 4 statements in the if (!permissionGranted) clause?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refactored per yr comment
Description
Throw an error when Android users deny permissions.
Related Issues
Fixes #34425
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]). This will ensure a smooth and quick review process.///).flutter analyze) does not report any problems on my PR.Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?