Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/in_app_purchase/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
11 changes: 6 additions & 5 deletions packages/in_app_purchase/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -87,7 +87,8 @@ if (!available) {
### Loading products for sale

```dart
Set<String> _kIds = <String>['product1', 'product2'].toSet();
// Set literals require Dart 2.2. Alternatively, use `Set<String> _kIds = <String>['product1', 'product2'].toSet()`.
const Set<String> _kIds = {'product1', 'product2'};
final ProductDetailsResponse response = await InAppPurchaseConnection.instance.queryProductDetails(_kIds);
if (!response.notFoundIDs.isEmpty) {
// Handle the error.
Expand Down
2 changes: 1 addition & 1 deletion packages/in_app_purchase/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 <flutter-dev@googlegroups.com>
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
Expand Down