[in_app_purchase] Fix broken dartdoc references in completePurchase#11648
[in_app_purchase] Fix broken dartdoc references in completePurchase#11648ishaquehassan wants to merge 1 commit intoflutter:mainfrom
Conversation
|
It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging. If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. If you believe this PR qualifies for a test exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group. |
There was a problem hiding this comment.
Code Review
This pull request corrects dartdoc references in the completePurchase method across the in_app_purchase and in_app_purchase_platform_interface packages, replacing references to the non-existent PurchaseException and errorCode with InAppPurchaseException and code. It also adds a necessary import to the platform interface and updates the changelogs for both packages. I have no feedback to provide.
Thanks for the contribution! You’ve checked boxes in the PR checklist above that are not reflected in this PR, so I’m assuming this is a work in progress and am marking it as a Draft. Please review the checklist, updating the PR as appropriate, and when the state of the PR as posted reflects the checklist please feel free to mark it as ready for review. |
The dartdoc on
InAppPurchase.completePurchaseandInAppPurchasePlatform.completePurchasereferenced aPurchaseExceptionclass and aPurchaseException.errorCodefield, neither of which exists in this package. The actual class thrown bycompletePurchaseisInAppPurchaseExceptionand its error code field is namedcode. Because of the typo the dartdoc links rendered as broken on pub.dev and api.flutter.dev.This PR rewrites the doc comment in both files to point at
InAppPurchaseException,InAppPurchaseException.code, andInAppPurchaseException.messageso the references resolve. The platform interface file also gains anerrors/errors.dartimport so the class is in scope for the dartdoc link. No runtime behavior changes.Fixes flutter/flutter#118626
Pre-Review Checklist
[shared_preferences]///).Footnotes
Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. ↩ ↩2