flutter_facebook_appevents 0.2.0
flutter_facebook_appevents: ^0.2.0 copied to clipboard

flutter_facebook_appevents integrates Facebook App Events to your Flutter app.

example/lib/main.dart

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

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

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: <Widget>[
              FlatButton(
                  child: Text("Reset User ID"),
                  onPressed: () => FacebookAppEvents.resetUserId()),
              FlatButton(
                  child: Text("Set User ID"),
                  onPressed: () => FacebookAppEvents.setUserId("user")),
              FlatButton(
                  child: Text("Log Event"),
                  onPressed: () =>
                      FacebookAppEvents.logEvent("test_", {"k": "v"})),
            ],
          ),
        ),
      ),
    );
  }
}
0
likes
90
pub points
60%
popularity

flutter_facebook_appevents integrates Facebook App Events to your Flutter app.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on flutter_facebook_appevents