updateConsent method

Future<void> updateConsent(
  1. bool allowed
)

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);
}