requestConsentInfoUpdate method

  1. @override
Future<void> requestConsentInfoUpdate({
  1. bool? tagForUnderAgeOfConsent,
  2. ConsentDebugOptions? debug,
})
override

Refreshes UMP consent info. Call once every app launch.

Throws an AdFlowError (kind consent) on failure.

Implementation

@override
Future<void> requestConsentInfoUpdate({
  bool? tagForUnderAgeOfConsent,
  ConsentDebugOptions? debug,
}) async {
  consentUpdateCalls.add(
    ConsentUpdateCall(
      tagForUnderAgeOfConsent: tagForUnderAgeOfConsent,
      debug: debug,
    ),
  );
  final hold = consentUpdateHold;
  if (hold != null) await hold.future;
  final error = consentUpdateError;
  if (error != null) throw error;
  onConsentInfoUpdate?.call();
}