pushLast method

Future<RedisReply> pushLast(
  1. String key,
  2. dynamic element, [
  3. List? elements
])

RPUSH - Pushes a element or a list of them to the tail (last)

Implementation

Future<RedisReply> pushLast(String key, element, [List? elements]) async {
  if (element is List) {
    throw _error(
        'You have to pass a single element before the list of the rest.\n');
  }
  final _elmts = elements?.map((e) => '$e').toList();
  return command('RPUSH', [key, '$element', ..._elmts ?? []]);
}