友盟统计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");
}
For help getting started with Flutter, view our online documentation.
For help on editing plugin code, view the documentation.