brevoflutter library

A Flutter package for Brevo (formerly Sendinblue) Marketing Automation API integration.

This package provides a simple and type-safe way to integrate Brevo's Marketing Automation API into your Flutter applications.

Features

  • User identification with custom attributes
  • Event tracking with structured event data
  • Link click tracking
  • Page view tracking
  • Comprehensive error handling
  • Type-safe request models

Getting Started

Initialize the tracker in your app's main function:

import 'package:brevoflutter/brevoflutter.dart';

void main() {
  BrevoTracker.instance.initialize(
    apiKey: 'YOUR_MA_KEY_HERE',
  );
  runApp(const MyApp());
}

Usage

Identify a user

await BrevoTracker.instance.identifyUser(
  email: 'user@example.com',
  attributes: {
    'FirstName': 'John',
    'LastName': 'Doe',
  },
);

Track an event

await BrevoTracker.instance.trackEvent(
  email: 'user@example.com',
  event: 'purchase_completed',
  properties: {
    'order_total': '99.99',
  },
);