This repository was archived by the owner on Feb 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
[image_picker] Updated pickImage and pickVideo docs to expose the possible errors that can be thrown #2662
Closed
joaomagfreitas
wants to merge
5
commits into
flutter:master
from
joaomagfreitas:image_picker/add-missing-doc
Closed
[image_picker] Updated pickImage and pickVideo docs to expose the possible errors that can be thrown #2662
Changes from 2 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
7888bac
Updated pickImage and pickVideo docs to expose the possible errors th…
joaomagfreitas 6c73545
Updated plugin version on pubspec.yaml and CHANGELOG.md
joaomagfreitas 72eac69
Updated how pickImage and pickVideo docs were referencing PlatformExc…
joaomagfreitas a0de9d0
Update pickImage and pickVideo docks to reference that due to an unkn…
joaomagfreitas b6e908d
Merge branch 'master' into image_picker/add-missing-doc
joaomagfreitas File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
nits:
Also, the message might be a little too definitive as there might be other platform exception thrown due to some error caused in the platform. (Like some iOS errors unknown to us), we might want to re-word it a little. Maybe something like "The method could throw a [PlatformException] if..."
Uh oh!
There was an error while loading. Please reload this page.
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.
Hi @cyanglaz
Thanks for the feedback! I update the docs to explicit that the method could throw a
PlatformExceptionbut left the description of the possible exceptions, because I think it is necessary for developers to be aware of the common exceptions that they might have to deal with when reading the documentation. If on the method docs is not the best place, could it be explicit instead on README.md?Thanks,
freitzzz
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.
Sorry I didn't make myself clear enough. I meant what you have done is mostly ok, just that we need to indicate there might be other errors besides the ones that you have there.
Uh oh!
There was an error while loading. Please reload this page.
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.
Got it! Just updated to reference that
PlatformExceptioncould also be thrown due to an unknow error. Is it ok for now, or do you think it needs to be rephrased?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.
@cyanglaz Let me know if you still want these changes
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.
absolutely! If you could rebase and resolve the conflicts, I will land this! Thanks again.