playstore_billing_country_android 0.0.2 copy "playstore_billing_country_android: ^0.0.2" to clipboard
playstore_billing_country_android: ^0.0.2 copied to clipboard

PlatformAndroid

A Flutter plugin for retrieving the billing country via Google Play Billing.

Playstore Billing Country Android #

📌 A Flutter plugin to get the user's billing country from Google Play Store.

Features #

✅ Retrieves the billing country from Google Play Billing API (v6+).
✅ Works on Android devices with Google Play services.
✅ Uses Google Play BillingClient under the hood.

Installation #

Add the package to your pubspec.yaml:

dependencies:
  playstore_billing_country_android: ^0.0.1

Usage #

  1. Import the package:
import 'package:playstore_billing_country_android/playstore_billing_country_android.dart';
  1. Get the billing country

Call the getBillingCountry() method:

final PlaystoreBillingCountryAndroid billingPlugin = PlaystoreBillingCountryAndroid();

Future<void> fetchBillingCountry() async {
  try {
    final String? country = await billingPlugin.getBillingCountry();
    print('Billing Country: $country');
  } catch (e) {
    print('Error fetching billing country: $e');
  }
}

Platform Support #

Platform Supported
✅ Android ✅ Yes
❌ iOS ❌ No

Requirements #

  • Android API 21+
  • Google Play Billing API v6+
  • Google Play services installed

Troubleshooting #

If the plugin returns null or fails:

  • Ensure the app is installed via Google Play (not sideloaded).
  • Verify Google Play Billing API is enabled for your Google Play account.
  • Debug logs can help: adb logcat -s BillingClient
0
likes
145
points
1
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter plugin for retrieving the billing country via Google Play Billing.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on playstore_billing_country_android

Packages that implement playstore_billing_country_android