qonversion_flutter 1.0.1 copy "qonversion_flutter: ^1.0.1" to clipboard
qonversion_flutter: ^1.0.1 copied to clipboard

outdated

In-App Subscription Infrastructure to grow your subscription business

example/lib/main.dart

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

import 'package:qonversion_flutter/qonversion_flutter.dart';

void main() => runApp(MyApp());

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  String _uid = 'Not Initialized Qonversion Yet';

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

  Future<void> initPlatformState() async {
    String uid;
    try {
      uid = await Qonversion.launch('');
      print(uid);
    } catch (e) {
      print('Failed to obtain uid from Qonversion.');
      print(e);
    }

    if (!mounted) return;

    setState(() => _uid = uid);
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Qonversion example app'),
        ),
        body: Center(
          child: Text(
            'Qonversion uid: \n$_uid\n',
            textAlign: TextAlign.center,
          ),
        ),
      ),
    );
  }
}
48
likes
0
pub points
86%
popularity

Publisher

verified publisherqonversion.io

In-App Subscription Infrastructure to grow your subscription business

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on qonversion_flutter