sendtrail 0.1.0
sendtrail: ^0.1.0 copied to clipboard
Flutter client for Sendtrail installation registration, analytics, and FCM token updates.
Sendtrail SDK for Flutter #
Install with flutter pub add sendtrail. The SDK supports Android, iOS, and Flutter Web.
It registers installations, tracks events, and updates Firebase Cloud Messaging registrations.
import 'package:sendtrail/sendtrail.dart';
final sendtrail = Sendtrail(
appId: sendtrailAppId,
getSession: (installation) async => SendtrailSession.fromJson(
await signedInApi.postJson('/api/sendtrail/session', installation.toJson()),
),
);
await sendtrail.registerDevice(appVersion: '1.0.0');
await sendtrail.track('screen_view', properties: {'screen': 'home'});
Keep the server key on your authenticated backend. See the Flutter quickstart and session exchange guide.