parseJsonList<T> method
Parses the response body as a JSON list and converts each item.
Implementation
List<T>? parseJsonList<T>(T Function(Map<String, dynamic> json) fromJson) {
final list = jsonListBody;
if (list == null) return null;
try {
return list.map((e) => fromJson(e as Map<String, dynamic>)).toList();
} catch (_) {
return null;
}
}