From 7d08c7a77ffcbb7a0de85e88119339e09134236b Mon Sep 17 00:00:00 2001 From: Moritz Morgenroth <35544088+moritzmorgenroth@users.noreply.github.com> Date: Thu, 4 Jul 2019 09:59:57 +0200 Subject: [PATCH 1/4] Documentation updates CHANGELOG * Remove explicit typing in `_subscription` callback * Remove `const` modifier for `_kIds` list * Fix not found ids check typos * Migrate loop iterator from `:` to `in` --- packages/in_app_purchase/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/in_app_purchase/README.md b/packages/in_app_purchase/README.md index 24584850474c..d6c93f58d04d 100644 --- a/packages/in_app_purchase/README.md +++ b/packages/in_app_purchase/README.md @@ -62,7 +62,7 @@ class _MyAppState extends State { void initState() { final Stream purchaseUpdates = InAppPurchaseConnection.instance.purchaseUpdatedStream; - _subscription = purchaseUpdates.listen((List purchases) { + _subscription = purchaseUpdates.listen((purchases) { _handlePurchaseUpdates(purchases); }); super.initState(); @@ -87,9 +87,9 @@ if (!available) { ### Loading products for sale ```dart -const Set _kIds = ['product1', 'product2'].toSet(); +Set _kIds = ['product1', 'product2'].toSet(); final ProductDetailsResponse response = await InAppPurchaseConnection.instance.queryProductDetails(_kIds); -if (!response.notFoundIds.isEmpty()) { +if (!response.notFoundIDs.isEmpty) { // Handle the error. } List products = response.productDetails; @@ -102,7 +102,7 @@ final QueryPurchaseDetailsResponse response = await InAppPurchaseConnection.inst if (response.error != null) { // Handle the error. } -for (PurchaseDetails purchase : repsonse.pastPurchases) { +for (PurchaseDetails purchase in repsonse.pastPurchases) { _verifyPurchase(purchase); // Verify the purchase following the best practices for each storefront. _deliverPurchase(purchase); // Deliver the purchase to the user in your app. if (Platform.isIOS) { From 09477acb0aec9b9b5ef12f9509073199ea2f67d7 Mon Sep 17 00:00:00 2001 From: Moritz Morgenroth <35544088+moritzmorgenroth@users.noreply.github.com> Date: Thu, 4 Jul 2019 10:06:58 +0200 Subject: [PATCH 2/4] Bump version --- packages/in_app_purchase/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/in_app_purchase/pubspec.yaml b/packages/in_app_purchase/pubspec.yaml index 75d187389ea5..3987990e1c77 100644 --- a/packages/in_app_purchase/pubspec.yaml +++ b/packages/in_app_purchase/pubspec.yaml @@ -2,7 +2,7 @@ name: in_app_purchase description: A Flutter plugin for in-app purchases. Exposes APIs for making in-app purchases through the App Store and Google Play. author: Flutter Team homepage: https://github.com/flutter/plugins/tree/master/packages/in_app_purchase -version: 0.2.0+2 +version: 0.2.0+3 dependencies: async: ^2.0.8 From 55d0899e6130a70483d6069c5391f3e1307b524e Mon Sep 17 00:00:00 2001 From: Moritz Morgenroth <35544088+moritzmorgenroth@users.noreply.github.com> Date: Thu, 4 Jul 2019 10:09:11 +0200 Subject: [PATCH 3/4] Update CHANGELOG.md --- packages/in_app_purchase/CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/in_app_purchase/CHANGELOG.md b/packages/in_app_purchase/CHANGELOG.md index be8d4d5c9cf4..32f56899826e 100644 --- a/packages/in_app_purchase/CHANGELOG.md +++ b/packages/in_app_purchase/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.2.0+3 + +* Update the `README.md` so that the code samples compile with the latest Flutter/Dart version. + ## 0.2.0+2 * Fix a google_play_connection purchase update listener regression introduced in 0.2.0+1. From dc240cffaf71a31d5dc5dd6f596a1ec56cb794a5 Mon Sep 17 00:00:00 2001 From: Collin Jackson Date: Mon, 8 Jul 2019 10:27:38 -0700 Subject: [PATCH 4/4] Update README.md Fix typo --- packages/in_app_purchase/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/in_app_purchase/README.md b/packages/in_app_purchase/README.md index d6c93f58d04d..3b8d1a4df04c 100644 --- a/packages/in_app_purchase/README.md +++ b/packages/in_app_purchase/README.md @@ -102,7 +102,7 @@ final QueryPurchaseDetailsResponse response = await InAppPurchaseConnection.inst if (response.error != null) { // Handle the error. } -for (PurchaseDetails purchase in repsonse.pastPurchases) { +for (PurchaseDetails purchase in response.pastPurchases) { _verifyPurchase(purchase); // Verify the purchase following the best practices for each storefront. _deliverPurchase(purchase); // Deliver the purchase to the user in your app. if (Platform.isIOS) {