Biscotti CMP — Flutter SDK

Native Flutter consent-management SDK for Biscotti CMP, with IAB TCF 2.3 support (CMP ID 497), consent-gated SDK initialisation, App Tracking Transparency coordination (iOS), offline queueing and consent sync.

  • Package: biscotti_cmp · Platforms: Android, iOS · Dart 3.2+ / Flutter 3.16+

Installation

# pubspec.yaml
dependencies:
  biscotti_cmp: ^1.0.0
flutter pub get

Usage

import 'package:biscotti_cmp/biscotti_cmp.dart';

// Configure early (e.g. in main()) — configure() is async
await BiscottiCMP.instance.configure(
  websiteId: 'YOUR_WEBSITE_ID',
  apiKey: 'OPTIONAL',
);

// Gate third-party SDKs behind consent
BiscottiCMP.instance.registerSDK(
  name: 'firebase_analytics',
  category: ConsentCategory.analytics,
  initializer: () => FirebaseAnalytics.instance,
);

// Read consent (synchronous, from local cache)
final granted = BiscottiCMP.instance.hasConsent(ConsentCategory.marketing);
final tcString = BiscottiCMP.instance.getConsentToken();

TCF 2.3

Emits a spec-compliant IAB TC string (CMP ID 497, policy version 5, service-specific) including vendor consents / legitimate interests and the disclosed-vendors segment, derived from your per-site Biscotti configuration.

License

MIT — see LICENSE.

Libraries

biscotti_cmp
Biscotti CMP Flutter SDK — native consent management with IAB TCF 2.3 compliance.