Skip to main content

lighthouse_north_client 0.2.1 copy "lighthouse_north_client: ^0.2.1" to clipboard
lighthouse_north_client: ^0.2.1 copied to clipboard

SDK Flutter oficial para integrar o app do cliente à plataforma Lighthouse North de disparo push: registro de device token com evidência de consentimento (LGPD), heartbeat e opt-out fácil e gratuito. [...]

Lighthouse North SDK for Flutter #

Add push notifications to your Flutter app with built-in LGPD consent evidence, heartbeat, and easy opt-out.

Features #

  • 📱 Push registration — device token + consent evidence in one call
  • 🔔 Heartbeat — keeps device alive on the platform (24h, auto-restart)
  • 🚪 Opt-out — one method, always free, never throws
  • 🛡️ LGPD by design — collects only platform, token, contactRef, consent. Nothing else
  • 🔒 No secrets in logs — tokens are always masked
  • 📦 Zero bloat — only dependency is http (no Firebase bundled)

Installation #

dependencies:
  lighthouse_north_client: ^0.2.0

Quick Start #

1. Get your App Key #

In your Lighthouse North dashboard: Apps → Keys. The key looks like ak_....

Keep it in environment config (--dart-define or .env), never hardcoded.

2. Initialize #

import 'package:lighthouse_north_client/lighthouse_north_client.dart';

final client = await LighthouseNorthClient.init(
  appKey,
  apiBaseUrl: 'https://api.lighthousenorth.com.br',
);

3. Register for Push #

Call this from a user action (button tap), not on app start:

final result = await client.registerForPush(
  contactRef: 'user-123',        // your user ID (optional)
  policyVersion: '2026-09',      // consent policy version
);
await client.startHeartbeat();

4. Handle Opt-out #

Always show an opt-out option in your app settings:

await client.optOut(); // removes device from platform

API #

Method What it does
LighthouseNorthClient.init(key, url) Initialize and resume heartbeat
registerForPush(contactRef, policyVersion) Register token + consent
startHeartbeat() / stopHeartbeat() 24h keep-alive
optOut() Remove device (best-effort, never throws)
onPermissionRevoked Auto-cleanup when user denies notifications

Requirements #

  • Flutter 3.0+ / Dart 3.0+
  • Android: minSdk 21 · iOS: iOS 12+
  • Your app must have Firebase configured (SDK uses FCM token, but doesn't bundle Firebase)

Privacy #

This SDK collects exactly: device platform, FCM token, your contact reference, and consent version. No IP, no user agent, no advertising ID, no app data. See our Privacy Policy.

License #

MIT

0
likes
0
points
0
downloads

Publisher

verified publisherlighthousenorth.com.br

Weekly Downloads

SDK Flutter oficial para integrar o app do cliente à plataforma Lighthouse North de disparo push: registro de device token com evidência de consentimento (LGPD), heartbeat e opt-out fácil e gratuito. Minimização por construção: coleta apenas platform/token/contactRef/consent.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, http, meta

More

Packages that depend on lighthouse_north_client

Packages that implement lighthouse_north_client