A Flutter analytics toolkit that sends events to Firebase, Facebook App Events and your own backend through one API — with a persistent device ID, an offline queue and per-provider user consent.
logEvent reaches Firebase, Facebook and your own backend.
Denied by default and tracked per provider.
Survives reinstall where the OS allows it.
Hive-backed batching, retry, backoff and Retry-After support.
One failing provider never affects the others.
Names and parameters follow Firebase and Facebook rules.
Add it from GitHub and pin a tag so updates never break your app.
Call it once at startup, then log events anywhere.
An event reaches a provider only when it is enabled in config, the user granted consent, and the call allows that destination. Priority: call → screen → app default.
The database provider POSTs batches with device_id, device info and events[] (each with a UUID id so you can ignore duplicates). 2xx removes events; 400/413/422 drops the batch; 429/5xx/timeouts retry with backoff (5 s → 5 min).
apiKey ships inside your app, so it is not a secret. Validate payloads and rate-limit on your server.| Option | Default | Description |
|---|---|---|
enableFirebase | true | Send to Firebase Analytics |
enableFacebook | true | Send to Facebook App Events |
enableDatabase | false | Send to your backend (needs databaseEndpoint) |
batchSize | 20 | Events per request (1–500) |
flushInterval | 30 s | Automatic upload interval (min 5 s) |
maxQueueSize | 1000 | Oldest events dropped beyond this |
maxRetries | 5 | Failures before pausing until next launch |
requestTimeout | 15 s | Per-request timeout |