Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Commit f679fcd

Browse files
committed
Adapt dart API
1 parent 847b1dc commit f679fcd

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

packages/in_app_purchase/in_app_purchase_android/lib/src/billing_client_wrappers/purchase_wrapper.dart

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ class PurchaseWrapper {
3333
required this.purchaseTime,
3434
required this.purchaseToken,
3535
required this.signature,
36-
required this.sku,
36+
this.sku = '', // Deprecated
37+
required this.skus,
3738
required this.isAutoRenewing,
3839
required this.originalJson,
3940
this.developerPayload,
@@ -104,9 +105,15 @@ class PurchaseWrapper {
104105
final String signature;
105106

106107
/// The product ID of this purchase.
108+
///
109+
/// This property is deprecated. Use `skus` instead.
107110
@JsonKey(defaultValue: '')
108111
final String sku;
109112

113+
/// The product IDs of this purchase.
114+
@JsonKey(defaultValue: <String>[])
115+
final List<String> skus;
116+
110117
/// True for subscriptions that renew automatically. Does not apply to
111118
/// [SkuType.inapp] products.
112119
///
@@ -178,7 +185,8 @@ class PurchaseHistoryRecordWrapper {
178185
required this.purchaseTime,
179186
required this.purchaseToken,
180187
required this.signature,
181-
required this.sku,
188+
this.sku = '', // Deprecated
189+
required this.skus,
182190
required this.originalJson,
183191
required this.developerPayload,
184192
});
@@ -201,9 +209,15 @@ class PurchaseHistoryRecordWrapper {
201209
final String signature;
202210

203211
/// The product ID of this purchase.
212+
///
213+
/// This property is deprecated. Use `skus` instead.
204214
@JsonKey(defaultValue: '')
205215
final String sku;
206216

217+
/// The product ID of this purchase.
218+
@JsonKey(defaultValue: <String>[])
219+
final List<String> skus;
220+
207221
/// Details about this purchase, in JSON.
208222
///
209223
/// This can be used verify a purchase. See ["Verify a purchase on a

packages/in_app_purchase/in_app_purchase_android/lib/src/billing_client_wrappers/purchase_wrapper.g.dart

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)