geoHash method

Future<List<String?>> geoHash(
  1. String key,
  2. List<Object> members
)

geoHash

Implementation

Future<List<String?>> geoHash(String key, List<Object> members) async {
  Object result = await _runWithRetryNew(() async {
    return (await RespCommandsTier1(_client!).geoHash(key, members));
  });

  if (result is RespType2<dynamic>) {
    final result1 = result.toArray().payload;
    if (result1 != null) {
      return result1
          .map((e) => e.toBulkString().payload)
          .toList(growable: false);
    }
    return [];
  }

  final result1 = (result as RespType3<dynamic>).toArray().payload;
  if (result1 != null) {
    return result1
        .map((e) => e.toBulkString().payload)
        .toList(growable: false);
  }
  return [];
}