receive method

Future<Map<String, dynamic>?> receive(
  1. String name, {
  2. bool create = true,
  3. bool wait = true,
})

Implementation

Future<Map<String, dynamic>?> receive(String name, {bool create = true, bool wait = true}) async {
  final response = await room.sendRequest("queues.receive", {"name": name, "create": create, "wait": wait});

  if (response is EmptyResponse) {
    return null;
  } else {
    return (response as JsonResponse).json;
  }
}