btc_purchase 0.0.9 copy "btc_purchase: ^0.0.9" to clipboard
btc_purchase: ^0.0.9 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", "moonthly"], BtcPurchase.SUBS);
}

class _MyAppState extends BtcPurchaseWidget<MyApp> {

  _MyAppState(super.purchase_ids, super.purchase_type, super.purchase_other_ids, super.purchase_other_type);

  @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}')),
        ),
      ),
    );
  }
}
1
likes
60
points
32
downloads

Publisher

unverified uploader

Weekly Downloads

A new InApp project.

Documentation

API reference

License

unknown (license)

Dependencies

flutter, flutter_web_plugins, plugin_platform_interface

More

Packages that depend on btc_purchase