updateConsent method
Implementation
Future<void> updateConsent(bool allowed) async {
Map<String, dynamic> collectConsents = allowed
? {
"collect": {"val": "y"}
}
: {
"collect": {"val": "n"}
};
Map<String, dynamic> currentConsents = {"consents": collectConsents};
Consent.update(currentConsents);
}