resolveConsentOptions static method

  1. @visibleForTesting
AdsConsentOptions resolveConsentOptions({
  1. AdsConsentOptions? consent,
  2. bool debug = kDebugMode,
})

Resolves the environment-aware default used when consent is omitted.

This is public only to make the policy easy to regression-test; apps should normally let init select the value from kDebugMode.

Implementation

@visibleForTesting
static AdsConsentOptions resolveConsentOptions({
  AdsConsentOptions? consent,
  bool debug = kDebugMode,
}) {
  return consent ??
      (debug
          ? const AdsConsentOptions.disabled()
          : const AdsConsentOptions());
}