flurry_event 0.1.3 copy "flurry_event: ^0.1.3" to clipboard
flurry_event: ^0.1.3 copied to clipboard

A Flutter plugin to use Flurry Analytics. This plugin logs sessions, crash detections, simple event logging, UserId.

example/lib/main.dart

import 'package:flurry/flurry.dart';
import 'package:flutter/material.dart';
import 'dart:async';

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

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

class _MyAppState extends State<MyApp> {
  @override
  void initState() {
    super.initState();
    initPlatformState();
  }

  // Platform messages are asynchronous, so we initialize in an async method.
  Future<void> initPlatformState() async {
    await FlurryEvent.initialize(
        androidKey: "QX7WZTNJ8468J6SR8DR3",
        iosKey: "XCCWQH4MCD45JHSM4BYN",
        enableLog: true);
    await FlurryEvent.setUserId("userId");
    await FlurryEvent.logEvent("eventName");
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('A Flurry plugin example app'),
        ),
        body: Center(
          child: Text(
              'Should log event. Please close the app and wait a few seconds for events to be sent.'),
        ),
      ),
    );
  }
}
4
likes
40
pub points
0%
popularity

Publisher

unverified uploader

A Flutter plugin to use Flurry Analytics. This plugin logs sessions, crash detections, simple event logging, UserId.

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on flurry_event