retrieveAllPractices static method
Implementation
static Future<List<Practice>> retrieveAllPractices() async {
final List<Practice> practices = [];
final res = await httpClient.get(Config.getURI('practices.json'));
for (final practice in json.decode(res.body.toString())) {
Practice p = Practice.fromJson(practice);
p.hasPermission = await AuthService.hasPermission(int.parse(p.accountId));
practices.add(p);
}
return practices;
}