File tree 4 files changed +33
-3
lines changed
packages/in_app_purchase/in_app_purchase_platform_interface
4 files changed +33
-3
lines changed Original file line number Diff line number Diff line change 1
- ## NEXT
1
+ ## 1.4.0
2
2
3
+ * Adds ` getCountryCode ` API.
3
4
* Updates minimum supported SDK version to Flutter 3.13/Dart 3.1.
4
5
5
6
## 1.3.7
39
40
40
41
## 1.3.0
41
42
42
- * Added new ` PurchaseStatus ` named ` canceled ` to distinguish between an error and user cancellation.
43
+ * Added new ` PurchaseStatus ` named ` canceled ` to distinguish between an error and user cancellation.
43
44
44
45
## 1.2.0
45
46
Original file line number Diff line number Diff line change @@ -194,4 +194,21 @@ abstract class InAppPurchasePlatform extends PlatformInterface {
194
194
/// [PurchaseDetails.verificationData].
195
195
Future <void > restorePurchases ({String ? applicationUserName}) =>
196
196
throw UnimplementedError ('restorePurchases() has not been implemented.' );
197
+
198
+ /// Returns the user's country.
199
+ ///
200
+ /// Android:
201
+ /// Returns Play billing country code based on ISO-3166-1 alpha2 format.
202
+ ///
203
+ /// See: https://developer.android.com/reference/com/android/billingclient/api/BillingConfig
204
+ /// See: https://unicode.org/cldr/charts/latest/supplemental/territory_containment_un_m_49.html
205
+ ///
206
+ /// iOS:
207
+ /// Returns the country code from SKStoreFrontWrapper.
208
+ ///
209
+ /// See: https://developer.apple.com/documentation/storekit/skstorefront?language=objc
210
+ ///
211
+ ///
212
+ Future <String > countryCode () =>
213
+ throw UnimplementedError ('countryCode() has not been implemented.' );
197
214
}
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ repository: https://github.com/flutter/packages/tree/main/packages/in_app_purcha
4
4
issue_tracker : https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+in_app_purchase%22
5
5
# NOTE: We strongly prefer non-breaking changes, even at the expense of a
6
6
# less-clean API. See https://flutter.dev/go/platform-interface-breaking-changes
7
- version : 1.3.7
7
+ version : 1.4.0
8
8
9
9
environment :
10
10
sdk : ^3.1.0
Original file line number Diff line number Diff line change @@ -119,6 +119,18 @@ void main() {
119
119
throwsUnimplementedError,
120
120
);
121
121
});
122
+
123
+ test (
124
+ 'Default implementation of countryCode should throw unimplemented error' ,
125
+ () {
126
+ final ExtendsInAppPurchasePlatform inAppPurchasePlatform =
127
+ ExtendsInAppPurchasePlatform ();
128
+
129
+ expect (
130
+ () => inAppPurchasePlatform.countryCode (),
131
+ throwsUnimplementedError,
132
+ );
133
+ });
122
134
});
123
135
124
136
group ('$InAppPurchasePlatformAddition ' , () {
You can’t perform that action at this time.
0 commit comments