getServingTypeById method

Future<ServingType> getServingTypeById(
  1. String id
)

Gets the serving type that matches an id.

Implementation

Future<ServingType> getServingTypeById(String id) async {
  final response = await _context.client.get(
    Uri.https(authority, '$path/servingtypes/$id'),
  );

  ClientException.checkIsSuccessStatusCode(response);

  return ServingType.fromJson(json.decode(response.body));
}