apphud_plus 0.0.1 copy "apphud_plus: ^0.0.1" to clipboard
apphud_plus: ^0.0.1 copied to clipboard

outdated

A package for listening to Apphud notifications and purchasing products.

example/lib/main.dart

import 'package:apphud_plus/apphud_plus.dart';
import 'package:flutter/material.dart';

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

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

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  String _platformVersion = 'Unknown';
  final _apphudPlusPlugin = ApphudPlus();

  @override
  void initState() {
    super.initState();
    test();
  }

  Future<void> test() async {
    print(await _apphudPlusPlugin.paywallsDidLoad());
    await Future.delayed(Duration(seconds: 5));
    await _apphudPlusPlugin.purchase('ft_demo_1w');
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: Text('Running on: $_platformVersion\n'),
        ),
      ),
    );
  }
}
3
likes
0
pub points
29%
popularity

Publisher

unverified uploader

A package for listening to Apphud notifications and purchasing products.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on apphud_plus