driving_consent 0.1.1
driving_consent: ^0.1.1 copied to clipboard
Automotive-grade privacy consent model with Jidoka semantics — UNKNOWN equals DENIED. Per-purpose consent (fleet location, weather telemetry, diagnostics), multi-jurisdiction support (GDPR, CCPA, APPI [...]
example/main.dart
import 'package:driving_consent/driving_consent.dart';
Future<void> main() async {
final service = InMemoryConsentService();
final initial = await service.getConsent(ConsentPurpose.fleetLocation);
print('initial: ${initial.status.name} '
'(effective=${initial.isEffectivelyGranted})');
await service.grant(ConsentPurpose.fleetLocation, Jurisdiction.appi);
final granted = await service.getConsent(ConsentPurpose.fleetLocation);
print('after grant: ${granted.status.name} '
'(effective=${granted.isEffectivelyGranted})');
await service.revoke(ConsentPurpose.fleetLocation);
final revoked = await service.getConsent(ConsentPurpose.fleetLocation);
print('after revoke: ${revoked.status.name} '
'(effective=${revoked.isEffectivelyGranted})');
await service.dispose();
}