loadConsentForm static method
void
loadConsentForm({
- dynamic onCheckedStatus(
- ConsentStatus status
- dynamic onError(
- FormError
Implementation
static void loadConsentForm({Function(ConsentStatus status)? onCheckedStatus, Function(FormError)? onError}) {
ConsentForm.loadConsentForm(
(consentForm) async {
final status = await ConsentInformation.instance.getConsentStatus();
if (status == ConsentStatus.required) {
consentForm.show((formError) {
if (formError != null) {
onError?.call(formError);
}
loadConsentForm(onCheckedStatus: onCheckedStatus, onError: onError);
});
} else {
onCheckedStatus?.call(status);
}
},
(formError) => onError?.call(formError),
);
}