getServingTypes method

Future<List<ServingType>> getServingTypes()

Gets all the serving types.

Implementation

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

  ClientException.checkIsSuccessStatusCode(response);

  return (json.decode(response.body) as List)
      .map((e) => ServingType.fromJson(e))
      .toList();
}