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

FireFlutter in-app-purchase package. This package is a submodule of fireflutter.

In app purchase module for Fireflutter #

In app purchase for fireflutter

Setup #

  • Create an instance of Payment class some where in global space.
final Payment payment = Payment();
copied to clipboard
  • Let the in-app-purchase plugin know that we are using it.
import 'package:in_app_purchase/in_app_purchase.dart';
void main() {
  // Let the plugin know that this app supports pending purchases.
  InAppPurchaseConnection.enablePendingPurchases();
  runApp(MyApp());
}
copied to clipboard
  • Inititiate Payment instance with productIds of App/Play store.
class _MyAppState extends State<MyApp> {
  @override
  void initState() {
    payment.init(productIds: {'product1', 'product2', 'lucky_box'});
    super.initState();
  }
copied to clipboard
1
likes
30
points
34
downloads

Publisher

verified publishersonub.com

Weekly Downloads

2024.09.11 - 2025.03.26

FireFlutter in-app-purchase package. This package is a submodule of fireflutter.

Repository (GitHub)

License

MIT (license)

Dependencies

cloud_firestore, firebase_auth, flutter, in_app_purchase, rxdart

More

Packages that depend on fireflutter_in_app_purchase