友盟统计Flutter插件
友盟统计官方SDK: umeng:analytics
import 'package:platform/platform.dart';
final Platform platform = const LocalPlatform();
if (platform.isAndroid)
UMengAnalytics.init('Android AppKey', encrypt: true, reportCrash: false);
else if (platform.isIOS)
UMengAnalytics.init('iOS AppKey', encrypt: true, reportCrash: false);
initState() {
super.initState();
UMengAnalytics.beginPageView("home");
}
dispose() {
super.dispose();
UMengAnalytics.endPageView("home");
}
someFunction() {
UMengAnalytics.logEvent("some click");
}
2千人QQ群,Flutter学习开发交流群,QQ群号:202921297, 欢迎大家加入。
For help getting started with Flutter, view our online documentation.
For help on editing plugin code, view the documentation.