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 3 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+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.
Expand Down
8 changes: 4 additions & 4 deletions packages/in_app_purchase/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class _MyAppState extends State<MyApp> {
void initState() {
final Stream purchaseUpdates =
InAppPurchaseConnection.instance.purchaseUpdatedStream;
_subscription = purchaseUpdates.listen((List<PurchaseDetails> purchases) {
_subscription = purchaseUpdates.listen((purchases) {
_handlePurchaseUpdates(purchases);
});
super.initState();
Expand All @@ -87,9 +87,9 @@ if (!available) {
### Loading products for sale

```dart
const Set<String> _kIds = <String>['product1', 'product2'].toSet();
Set<String> _kIds = <String>['product1', 'product2'].toSet();
final ProductDetailsResponse response = await InAppPurchaseConnection.instance.queryProductDetails(_kIds);
if (!response.notFoundIds.isEmpty()) {
if (!response.notFoundIDs.isEmpty) {
// Handle the error.
}
List<ProductDetails> products = response.productDetails;
Expand All @@ -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) {
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 <[email protected]>
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
Expand Down