retrieveLocation static method

Future<Location> retrieveLocation(
  1. String id
)

Implementation

static Future<Location> retrieveLocation(String id) async {
  final res = await httpClient.get(Config.getURI('/locations/$id.json'));
  Location location = Location.fromJson(json.decode(res.body.toString()));
  location.hasPermission = await AuthService.hasPermission(location.accountId);

  return location;
}