flutter_umeng_analytics_gf 0.0.5

Flutter Android iOS

Flutter Plugin for umeng:analytics (友盟统计)

example/lib/main.dart

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

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

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

class _MyAppState extends State<MyApp> {
  static bool _inited;
  @override
  initState() {
    super.initState();

    if (_inited == null) {
      _inited = true;
      UMengAnalytics.init('5a20cc45f43e48512000015d',
          policy: Policy.BATCH, encrypt: true, reportCrash: false);
    }
  }

  @override
  Widget build(BuildContext context) {
    return new MaterialApp(
      home: new Scaffold(
        appBar: new AppBar(
          title: new Text('Plugin example app'),
        ),
        body: new Center(
          child: new Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: [
            new RaisedButton(
              onPressed: () {
                UMengAnalytics.logEvent("hello");
              },
              child: new Text('Running on: hello'),
            ),
          ]),
        ),
      ),
    );
  }
}
0
likes
65
pub points
22%
popularity

Flutter Plugin for umeng:analytics (友盟统计)

Homepage

Documentation

API reference

Uploader

wyanassert@gmail.com

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on flutter_umeng_analytics_gf