giveConsentInit static method
Give consent for specific features. Should be call before Countly init
Implementation
@Deprecated('Use setConsentEnabled of CountlyConfig instead')
static Future<String?> giveConsentInit(List<String> consents) async {
String consentsString = consents.toString();
log('Calling "setRequiresConsent":[$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;
}