mGet method

Future<List<String?>> mGet(
  1. List<String> keys
)

MGET key key ...

Returns the values of all specified keys. For every key that does not hold a string value or does not exist, the special value nil is returned.

Complexity: O(N) where N is the number of keys to retrieve.

Returns:

Implementation

Future<List<String?>> mGet(List<String> keys) async {
  final cmd = <String>['MGET', ...keys];
  final result = await execute(cmd);
  if (result is List) {
    return result.cast<String?>();
  }
  return [];
}