setRequiresConsent static method

  1. @Deprecated('This function is deprecated, please use "setRequiresConsent" of CountlyConfig instead')
Future<String?> setRequiresConsent(
  1. bool flag
)

Set that consent should be required for features to work. Should be call before Countly init

Implementation

@Deprecated('This function is deprecated, please use "setRequiresConsent" of CountlyConfig instead')
static Future<String?> setRequiresConsent(bool flag) async {
  log('Calling "setRequiresConsent":[$flag]');
  log('setRequiresConsent is deprecated, use setRequiresConsent of CountlyConfig instead', logLevel: LogLevel.WARNING);
  List<String> args = [];
  args.add(flag.toString());

  final String? result = await _channel.invokeMethod('setRequiresConsent', <String, dynamic>{'data': json.encode(args)});

  return result;
}