Skip to content

[in_app_purchase] Update country code Android example #6722

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
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
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.3.5+1

* Updates example to use `countryCode` instead of deprecated `getCountryCode`.

## 0.3.5

* Replaces `getCountryCode` with `countryCode`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,10 +259,7 @@ class _MyAppState extends State<_MyApp> {
foregroundColor: Colors.white,
),
onPressed: () {
final InAppPurchaseAndroidPlatformAddition addition =
InAppPurchasePlatformAddition.instance!
as InAppPurchaseAndroidPlatformAddition;
unawaited(deliverCountryCode(addition.getCountryCode()));
unawaited(deliverCountryCode(_inAppPurchasePlatform.countryCode()));
},
child: const Text('Fetch Country Code'),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ class InAppPurchaseAndroidPlatformAddition
///
/// See: https://developer.android.com/reference/com/android/billingclient/api/BillingConfig
/// See: https://unicode.org/cldr/charts/latest/supplemental/territory_containment_un_m_49.html
@Deprecated('Use InAppPurchasePlatfrom.getCountryCode')
@Deprecated('Use InAppPurchasePlatfrom.countryCode')
Future<String> getCountryCode() async {
final BillingConfigWrapper billingConfig = await _billingClientManager
.runWithClient((BillingClient client) => client.getBillingConfig());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: in_app_purchase_android
description: An implementation for the Android platform of the Flutter `in_app_purchase` plugin. This uses the Android BillingClient APIs.
repository: https://github.com/flutter/packages/tree/main/packages/in_app_purchase/in_app_purchase_android
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+in_app_purchase%22
version: 0.3.5
version: 0.3.5+1

environment:
sdk: ^3.1.0
Expand Down