updateRemoteConfigForKeysOnly static method

  1. @Deprecated('This function is deprecated, please use "remoteConfigDownloadSpecificValue" instead')
Future<String?> updateRemoteConfigForKeysOnly(
  1. List<String> keys,
  2. dynamic callback(
    1. String?
    )
)

Replace specific remote config values with new ones from the server. returns the error or success message

Implementation

@Deprecated('This function is deprecated, please use "remoteConfigDownloadSpecificValue" instead')
static Future<String?> updateRemoteConfigForKeysOnly(List<String> keys, Function(String?) callback) async {
  if (!_instance._countlyState.isInitialized) {
    String message = '"initWithConfig" must be called before "updateRemoteConfigForKeysOnly"';
    log('updateRemoteConfigForKeysOnly, $message', logLevel: LogLevel.ERROR);
    return message;
  }
  String keysString = keys.toString();
  log('Calling "updateRemoteConfigForKeysOnly":[$keysString]');
  if (keys.isEmpty) {
    String error = 'updateRemoteConfigForKeysOnly, keys List is empty';
    log(error, logLevel: LogLevel.WARNING);
  }
  log(keys.toString());
  final String? result = await _channel.invokeMethod('updateRemoteConfigForKeysOnly', <String, dynamic>{'data': json.encode(keys)});

  callback(result);
  return result;
}