setListener method
Future<void>
setListener(
{ - void onConsentFormDismissed(
- String errorDescription
)?,
- void onConsentFormLoadFailure(
- String errorDescription
)?,
- void onConsentFormLoadSuccess()?,
- void onConsentInfoUpdateFailure(
- String errorDescription
)?,
- void onConsentInfoUpdateSuccess()?,
})
Implementation
Future<void> setListener({
void Function(String errorDescription)? onConsentFormDismissed,
void Function(String errorDescription)? onConsentFormLoadFailure,
void Function()? onConsentFormLoadSuccess,
void Function(String errorDescription)? onConsentInfoUpdateFailure,
void Function()? onConsentInfoUpdateSuccess,
}) async {
if(onConsentFormDismissed != null){
this.onConsentFormDismissed = onConsentFormDismissed;
}
if(onConsentFormLoadFailure != null){
this.onConsentFormLoadFailure = onConsentFormLoadFailure;
}
if(onConsentFormLoadSuccess != null){
this.onConsentFormLoadSuccess = onConsentFormLoadSuccess;
}
if(onConsentInfoUpdateFailure != null){
this.onConsentInfoUpdateFailure = onConsentInfoUpdateFailure;
}
if(onConsentInfoUpdateSuccess != null){
this.onConsentInfoUpdateSuccess = onConsentInfoUpdateSuccess;
}
_platform.setMethodCallHandler(_handleMethod);
return await _platform.invokeMethod('setListener');
}