get method

Future<Uint8List?> get(
  1. String key
)

Retrieves a value by key. Returns null if not found.

Implementation

Future<Uint8List?> get(String key) async {
  final r = await _send(opGet, key, Uint8List(0));
  if (r.isDenied) throw WsDeniedException('GET: ${utf8.decode(r.data)}');
  if (r.isNotFound) return null;
  if (r.isError) throw WsException('GET: ${utf8.decode(r.data)}');
  return r.data;
}