data_statistic 0.0.1
data_statistic: ^0.0.1 copied to clipboard

statistic data Flutter plugin.

example/lib/main.dart

import 'package:data_statistic/model/test_model.dart';
import 'package:flutter/material.dart';
import 'package:data_statistic/data_statistic.dart';

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

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

class _MyAppState extends State<MyApp> {

  @override
  void initState() {
    super.initState();
    DataStatistic.init("baseUrl","apiUrl","identify");
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Column(
          children: [
            RaisedButton(
              child: Text("Send"),
              onPressed: () {
                DataStatistic.send(TestModel(code: "123"));
              },
            )
          ],
        )
      )
    );
  }
}