giveConsentInit static method
- @Deprecated('This function is deprecated, please use "setConsentEnabled" of CountlyConfig instead')
Give consent for specific features. Should be call before Countly init returns the error or success message
Implementation
@Deprecated('This function is deprecated, please use "setConsentEnabled" of CountlyConfig instead')
static Future<String?> giveConsentInit(List<String> consents) async {
String consentsString = consents.toString();
log('Calling "giveConsentInit":[$consentsString]');
log('giveConsentInit is deprecated, use setConsentEnabled of CountlyConfig instead', logLevel: LogLevel.WARNING);
if (consents.isEmpty) {
String error = 'giveConsentInit, consents List is empty';
log(error, logLevel: LogLevel.WARNING);
}
log(consents.toString());
final String? result = await _channel.invokeMethod('giveConsentInit', <String, dynamic>{'data': json.encode(consents)});
return result;
}