checkConsentFormAvailable static method

void checkConsentFormAvailable({
  1. required ConsentRequestParameters params,
  2. dynamic onCheckFinished(
    1. bool isFormAvailable
    )?,
  3. dynamic onError(
    1. FormError
    )?,
})

Implementation

static void checkConsentFormAvailable({
  required ConsentRequestParameters params,
  Function(bool isFormAvailable)? onCheckFinished,
  Function(FormError)? onError,
}) {
  ConsentInformation.instance.requestConsentInfoUpdate(
    params,
        () async {
      final isFormAvailable = await ConsentInformation.instance.isConsentFormAvailable();
      onCheckFinished?.call(isFormAvailable);
        },
        (error) => onError?.call(error),
  );
}