flutter_segment 1.0.0 copy "flutter_segment: ^1.0.0" to clipboard
flutter_segment: ^1.0.0 copied to clipboard

discontinued
outdated

Flutter implementation of Segment Analytics for iOS, Android and Web

example/lib/main.dart

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

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    Segment.screen(
      screenName: 'Example Screen',
    );
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text('Segment example app'),
        ),
        body: Center(
          child: FlatButton(
            child: Text('TRACK ACTION WITH SEGMENT'),
            onPressed: () {
              Segment.track(
                eventName: 'ButtonClicked',
                properties: {
                  'foo': 'bar',
                  'number': 1337,
                  'clicked': true,
                },
              );
            },
          ),
        ),
      ),
      navigatorObservers: [
        SegmentObserver(),
      ],
    );
  }
}
69
likes
40
pub points
92%
popularity

Publisher

unverified uploader

Flutter implementation of Segment Analytics for iOS, Android and Web

Homepage
Repository (GitHub)
View/report issues

Documentation

Documentation

License

MIT (license)

Dependencies

flutter, flutter_web_plugins, meta

More

Packages that depend on flutter_segment