getJsonList method

Future<List> getJsonList(
  1. String endpoint
)

Performs a GET request and returns the parsed JSON response as a list.

Implementation

Future<List<dynamic>> getJsonList(String endpoint) async {
  final response = await getJson(endpoint);
  if (response.containsKey('results')) {
    return response['results'] as List<dynamic>;
  }
  throw NetworkException('Invalid response format: missing "results" field');
}