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

Launch your own loyalty club in 2 clicks, increase user engagement with gamification & reward them with dynamic earn & burn rules.

example/lib/main.dart

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

import 'package:flutter/services.dart';
import 'package:purplepro/purplepro.dart';

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

class MyApp extends StatefulWidget {
  const MyApp({super.key});

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

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

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

  // Platform messages are asynchronous, so we initialize in an async method.
  Future<void> initPurpleProPlugin() async {
    _purpleproPlugin.setPartnerIdAndUserId(partnerId: "77010207011", userId: "5842918d-7d0f-4091-ab8b-4a6abfb5bf22");
  }

  Future<void> startPurplepro() async {
    _purpleproPlugin.startBluePine(darkMode: false);
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.spaceEvenly,
            children: <Widget>[
              ElevatedButton(
                onPressed: () {
                  startPurplepro();
                },
                child: const Text('Enabled'),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
0
likes
130
pub points
0%
popularity

Publisher

unverified uploader

Launch your own loyalty club in 2 clicks, increase user engagement with gamification & reward them with dynamic earn & burn rules.

Documentation

API reference

License

unknown (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on purplepro