amplitude_flutter 0.0.1 copy "amplitude_flutter: ^0.0.1" to clipboard
amplitude_flutter: ^0.0.1 copied to clipboard

outdated

A new flutter plugin project.

amplitude_flutter #

A Flutter plugin for tracking events to Amplitude.

Usage #

To use this plugin, add amplitude_flutter as a dependency in your pubspec.yaml file.

Import package:amplitude_flutter/amplitude_flutter.dart, and instantiate AmplitudeFlutter with your API_KEY.

Example #

import 'package:amplitude_flutter/amplitude_flutter.dart';

Future<void> example() async {
  final AmplitudeFlutter analytics =  AmplitudeFlutter('API KEY');

  // log an event
  await analytics.logEvent(name: 'Dart Click');

  // Log events with properties
  await analytics.logEvent(name: 'Dart Click', properties: { 'key': 'value' });

  // identify a user
  final Identify identify = Identify()
    ..set('cohort', 'Test A')
    ..setOnce('completed_onboarding', 'true')
    ..add('login_count', 1)
    ..append('tags', 'new tag')
    ..unset('demo_user');

  await analytics.identify(identify);
}

Getting Started #

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

For help on editing plugin code, view the documentation.

90
likes
0
pub points
97%
popularity

Publisher

unverified uploader

A new flutter plugin project.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

crypto, device_info, flutter, http

More

Packages that depend on amplitude_flutter