diff --git a/packages/in_app_purchase/CHANGELOG.md b/packages/in_app_purchase/CHANGELOG.md index 32f56899826e..32ba5b1147ca 100644 --- a/packages/in_app_purchase/CHANGELOG.md +++ b/packages/in_app_purchase/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.2.0+4 + +* Fixed code error in `README.md` and adjusted links to work on Pub. + ## 0.2.0+3 * Update the `README.md` so that the code samples compile with the latest Flutter/Dart version. diff --git a/packages/in_app_purchase/README.md b/packages/in_app_purchase/README.md index 3b8d1a4df04c..ce564d14fea3 100644 --- a/packages/in_app_purchase/README.md +++ b/packages/in_app_purchase/README.md @@ -26,14 +26,14 @@ guides: * [In-App Purchase (App Store)](https://developer.apple.com/in-app-purchase/) * [Google Play Biling Overview](https://developer.android.com/google/play/billing/billing_overview) -You can check out the [example app README](example/README.md) for steps on how +You can check out the [example app README](https://github.com/flutter/plugins/blob/master/packages/in_app_purchase/example/README.md) for steps on how to configure in app purchases in both stores. Once you've configured your in app purchases in their respective stores, you're able to start using the plugin. There's two basic options available to you to use. -1. [in_app_purchase.dart](lib/src/in_app_purchase.dart), +1. [in_app_purchase.dart](https://github.com/flutter/plugins/tree/master/packages/in_app_purchase/lib/src/in_app_purchase), the generic idiommatic Flutter API. This exposes the most basic IAP-related functionality. The goal is that Flutter apps should be able to use this API surface on its own for the vast majority of cases. If you use this you should @@ -42,8 +42,8 @@ use. below. 2. Dart APIs exposing the underlying platform APIs as directly as possible: - [store_kit_wrappers.dart](lib/src/store_kit_wrappers.dart) and - [billing_client_wrappers.dart](lib/src/billing_client_wrappers.dart). These + [store_kit_wrappers.dart](https://github.com/flutter/plugins/blob/master/packages/in_app_purchase/lib/src/store_kit_wrappers) and + [billing_client_wrappers.dart](https://github.com/flutter/plugins/blob/master/packages/in_app_purchase/lib/src/billing_client_wrappers). These API surfaces should expose all the platform-specific behavior and allow for more fine-tuned control when needed. However if you use this you'll need to code your purchase handling logic significantly differently depending on @@ -87,7 +87,8 @@ if (!available) { ### Loading products for sale ```dart -Set _kIds = ['product1', 'product2'].toSet(); +// Set literals require Dart 2.2. Alternatively, use `Set _kIds = ['product1', 'product2'].toSet()`. +const Set _kIds = {'product1', 'product2'}; final ProductDetailsResponse response = await InAppPurchaseConnection.instance.queryProductDetails(_kIds); if (!response.notFoundIDs.isEmpty) { // Handle the error. diff --git a/packages/in_app_purchase/pubspec.yaml b/packages/in_app_purchase/pubspec.yaml index 3987990e1c77..5838ab1ff29b 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+3 +version: 0.2.0+4 dependencies: async: ^2.0.8