flutter_umeng_analytics 0.0.1

  • README.md
  • Example
  • Installing
  • Versions
  • 11

flutter_umeng_analytics #

Flutter plugin for umeng:analytics

Usage #

Init #

import 'package:platform/platform.dart';

final Platform platform = const LocalPlatform();
if (platform.isAndroid)
  UMengAnalytics.init('Android AppKey',
          policy: Policy.BATCH, encrypt: true, reportCrash: false);
else if (platform.isIOS)
  UMengAnalytics.init('iOS AppKey',
          policy: Policy.BATCH, encrypt: true, reportCrash: false);

Log page #

initState() {


dispose() {


someFunction() {
  UMengAnalytics.logEvent("some click");

Getting Started #

For help getting started with Flutter, view our online documentation.

For help on editing plugin code, view the documentation.


  • initial release.


import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_umeng_analytics/flutter_umeng_analytics.dart';

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

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

class _MyAppState extends State<MyApp> {
  static bool _inited;
  initState() {

    if (_inited == null) {
      _inited = true;
          policy: Policy.BATCH, encrypt: true, reportCrash: false);

  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: () {
              child: new Text('Running on: hello'),

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  flutter_umeng_analytics: ^0.0.1

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter packages get

Alternatively, your editor might support pub get or flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:flutter_umeng_analytics/flutter_umeng_analytics.dart';
Version Uploaded Documentation Archive
0.0.1 Jan 19, 2018 Go to the documentation of flutter_umeng_analytics 0.0.1 Download flutter_umeng_analytics 0.0.1 archive
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.

Analysis issues and suggestions

Support Dart 2 in pubspec.yaml.

The SDK constraint in pubspec.yaml doesn't allow the Dart 2.0.0 release. For information about upgrading it to be Dart 2 compatible, please see https://www.dartlang.org/dart-2#migration.

Maintenance issues and suggestions

Make sure dartdoc successfully runs on your package's source files. (-10 points)

Dependencies were not resolved.