showPrivacyOptionsForm method

Future<FormError?> showPrivacyOptionsForm()

Shows the Privacy Options Form (required for EEA/UK user consent revocation).

Implementation

Future<FormError?> showPrivacyOptionsForm() async {
  if (!AdConstants.isPlatformSupported) return null;
  final completer = Completer<FormError?>();
  ConsentForm.showPrivacyOptionsForm((formError) {
    if (formError != null) {
      developer.log(
        'Privacy options form error: ${formError.message} (code: ${formError.errorCode})',
        name: 'ConsentManager',
      );
    }
    if (!completer.isCompleted) {
      completer.complete(formError);
    }
  });
  return completer.future;
}