lrange method

Future<List<String?>> lrange(
  1. String key,
  2. int start,
  3. int stop
)

lrange

Implementation

Future<List<String?>> lrange(String key, int start, int stop) async {
  return await _runWithRetryNew(() async {
    final result =
        (await RespCommandsTier1(_client!).lrange(key, start, stop))
            .toArray()
            .payload;
    if (result != null) {
      return result
          .map((e) => e.toBulkString().payload)
          .toList(growable: false);
    }
    return [];
  });
}