webinstats_flutter_plugin 0.0.5 copy "webinstats_flutter_plugin: ^0.0.5" to clipboard
webinstats_flutter_plugin: ^0.0.5 copied to clipboard

WebInStats In-App Marketing SDK Flutter plugin.

example/lib/main.dart

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

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({Key? key}) : super(key: key);
  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  static const companyId = "1710";
  static const domain = "//bosc.webinstats.com/";

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Column(
          children: [
            ElevatedButton(
              child: const Text('Execute'),
              onPressed: () => Webinstats.execute(
                companyId,
                domain,
                {
                  "companyId": "1710",
                  "domain": '//bosc.webinstats.com/',
                  'p': "Other",
                  'wistest': "full",
                  '_enable_push': '1',
                  'cuid': '34'
                },
              ),
            ),
            ElevatedButton(
              child: const Text('Add Item'),
              onPressed: () => Webinstats.addItem(
                companyId,
                domain,
                "123",
                "1",
                "1300.50",
                "shoes",
                "Adidas White Sneaker",
              ),
            ),
            ElevatedButton(
              child: const Text('Create event'),
              onPressed: () => Webinstats.createEvent(
                companyId,
                domain,
                "Flutter",
                {},
              ),
            ),
            ElevatedButton(
              child: const Text('Set Push Click Callback'),
              onPressed: () => Webinstats.setPushClickCallback(
                (data) {
                  print('setPushClickCallback: data from the app: $data');
                },
                '1710',
              ),
            ),
          ],
        ),
      ),
    );
  }
}
1
likes
135
points
36
downloads

Publisher

unverified uploader

Weekly Downloads

WebInStats In-App Marketing SDK Flutter plugin.

Homepage

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on webinstats_flutter_plugin

Packages that implement webinstats_flutter_plugin