Flutter SDK · Preview
Consent and privacy
Connect your consent dialog, manage purpose-level decisions and control advertising identifiers on Flutter.
Preview: planned API
The Flutter SDK is in development and not published yet. This page describes the API we are building so you can plan your integration. Package names, signatures and defaults may still change before the first release.
Without a stored decision or a consent option the SDK starts as granted, like the Web SDK. If you ask for consent first, initialize with a pending state and update it when the customer decides. Decisions are stored on the device.
// When the visitor decides in your consent dialog
await Rtn.setConsent(ConsentState.granted);
// Purpose-level decisions
await Rtn.setConsentPurpose(ConsentPurpose.advertising, ConsentState.granted);
final ads = await Rtn.getConsentPurpose(ConsentPurpose.advertising);
// Stop and restart collection without losing identity
await Rtn.pause();
await Rtn.resume();Consent purposes
| Purpose | Controls |
|---|---|
analytics | Event collection and delivery. Set by setConsent. |
personalization | Using events for personalized messages and recommendations |
advertising | Advertising identifiers and syncing the customer to ad audiences |
audiences | Including the customer in segments shared with ad platforms |
probabilistic_attribution | Matching installs without a deterministic identifier |
While analytics is pending, events are kept on the device and sent once it is granted. When it is denied, queued events are deleted and nothing is collected.
Advertising identifiers
Advertising identifiers follow the native rules: the Google Advertising ID on Android and the IDFA on iOS only after Rtn.requestTrackingAuthorization() returns authorized. On Android that call completes immediately with authorized.
Data deletion
reset clears the known customer and starts a new anonymous identity on the device. To erase a customer's data, use the deletion request in the dashboard or the server API; the SDK does not delete server-side data.