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();
  • 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());
}
  • 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();
  }
1
likes
30
pub points
0%
popularity

Publisher

verified publishersonub.com

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

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

cloud_firestore, firebase_auth, flutter, in_app_purchase, rxdart

More

Packages that depend on fireflutter_in_app_purchase