deleteAllLocationKey method

void deleteAllLocationKey()

Deletes all location keys

Implementation

void deleteAllLocationKey() async {
  var response = await atClient?.getKeys(
    regex: locationKey,
  );
  await Future.forEach(response ?? [], (dynamic key) async {
    if (!'@$key'.contains('cached')) {
      // the keys i have created
      var atKey = getAtKey(key);
      var result = await atClient!.delete(
        atKey,
      );
      _logger.finer('$key is deleted ? $result');
    }
  });
}