webinstats_flutter 0.0.1
webinstats_flutter: ^0.0.1 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() {
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 = "1549";
static const domain = "//wis.webinstats.com/";
@override
void initState() {
super.initState();
}
@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": "1549",
"domain": '//wis.webinstats.com/',
'p': "Other",
'wistest': "full",
},
),
),
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",
{},
),
),
],
),
),
);
}
}