allFormulae method

Future<List<FormulaSummary>> allFormulae()

Fetch all formulae summaries.

GET /api/formula.json

Implementation

Future<List<FormulaSummary>> allFormulae() async {
  final body = await _get(Uri.parse('$baseUrl/formula.json'));
  final json = jsonDecode(body) as List<dynamic>;
  return json
      .map((e) => FormulaSummary.fromJson(e as Map<String, dynamic>))
      .toList();
}