btc_purchase 1.0.2 copy "btc_purchase: ^1.0.2" to clipboard
btc_purchase: ^1.0.2 copied to clipboard

A new InApp project.

example/lib/main.dart

import 'package:btc_purchase/PurchaseListener.dart';
import 'package:btc_purchase/btc_purchase_platform_interface.dart';
import 'package:btc_purchase/purchase_details.dart';
import 'package:flutter/material.dart';
import 'dart:async';

import 'package:flutter/services.dart';
import 'package:btc_purchase/btc_purchase.dart';
import 'package:btc_purchase/btc_purchase_widget.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  State<MyApp> createState() => _MyAppState(["remove_ads"], BtcPurchase.INAPP, ["weekly", "monthly"], BtcPurchase.SUBS);
}

class _MyAppState extends BtcPurchaseWidget<MyApp> {

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: InkWell(
              onTap: () {
                  launchPurchase('remove_ads', purchaseType: INAPP);
              },
              child:
                  Text('Price: ${BtcPurchase.purchaseList}\n\n${BtcPurchase.productsList}')),
        ),
      ),
    );
  }

  _MyAppState(super.purchase_ids, super.purchase_type, super.purchase_other_ids, super.purchase_other_type);
}
1
likes
0
points
27
downloads

Publisher

unverified uploader

Weekly Downloads

A new InApp project.

License

unknown (license)

Dependencies

flutter, flutter_web_plugins, plugin_platform_interface

More

Packages that depend on btc_purchase