replaceAllAppKeysInQueueWithCurrentAppKey static method

Future<String?> replaceAllAppKeysInQueueWithCurrentAppKey()

Replaces all requests with a different app key with the current app key. In request queue, if there are any request whose app key is different than the current app key, these requests' app key will be replaced with the current app key.

Implementation

static Future<String?> replaceAllAppKeysInQueueWithCurrentAppKey() async {
  if (!_instance._countlyState.isInitialized) {
    String message = '"initWithConfig" must be called before "replaceAllAppKeysInQueueWithCurrentAppKey"';
    log('replaceAllAppKeysInQueueWithCurrentAppKey, $message', logLevel: LogLevel.ERROR);
    return message;
  }
  log('Calling "replaceAllAppKeysInQueueWithCurrentAppKey"');
  final String? result = await _channel.invokeMethod('replaceAllAppKeysInQueueWithCurrentAppKey');

  return result;
}