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 _invoke("receive", {"name": name, "create": create, "wait": wait});

  if (response is EmptyContent) {
    return null;
  }
  if (response is JsonContent) {
    return response.json;
  }
  throw _unexpectedResponseError("receive");
}